Fix unbound variable
authormayeut <mayeut@users.noreply.github.com>
Sat, 12 Sep 2015 01:13:45 +0000 (03:13 +0200)
committermayeut <mayeut@users.noreply.github.com>
Sat, 12 Sep 2015 01:13:45 +0000 (03:13 +0200)
tools/travis-ci/install.sh
tools/travis-ci/run.sh

index f487ed364b8d506cb0add96734cff0fa90bfca07..5808f2792e8735ac96d1c9f6133d9aa0e9aa1e1a 100755 (executable)
@@ -49,7 +49,7 @@ chmod +x jpylyzer/jpylyzer/jpylyzer.py
 # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain.
 # Note: Binaries can only be used for non-commercial purposes.
 if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then
-       if [ "${TRAVIS_OS_NAME:-}" == "linux" ]; then
+       if [ "${TRAVIS_OS_NAME:-}" == "linux" ] || uname -s | grep -i Linux &> /dev/null; then
                echo "Retrieving Kakadu"
                wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip
                cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip
index 36bcc0d45ed70d72bb25b13841759f49053dd844..65cc1c47af4ebf7d8cc549389ddb610a07b94820 100755 (executable)
@@ -82,7 +82,11 @@ fi
 set -x
 if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ] && [ -d kdu ]; then
        if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
-               export LD_LIBRARY_PATH=${PWD}/kdu:${LD_LIBRARY_PATH}
+               if [ "${LD_LIBRARY_PATH:-}" == "" ]; then
+                       export LD_LIBRARY_PATH=${PWD}/kdu
+               else
+                       export LD_LIBRARY_PATH=${PWD}/kdu:${LD_LIBRARY_PATH}
+               fi
        fi
        export PATH=${PWD}/kdu:${PATH}
 fi