IVGCVSW-2115: Fix for unset USERNAME
authorjimfly01 <jim.flynn@arm.com>
Mon, 19 Nov 2018 13:42:45 +0000 (13:42 +0000)
committerMatteo Martincigh <matteo.martincigh@arm.com>
Mon, 19 Nov 2018 16:33:11 +0000 (16:33 +0000)
* When running the script standalone USERNAME can be unset causing failure

Change-Id: Idb1752117c319c8946426efe8882f03034b2bbbf

scripts/get_compute_library.sh

index 8d6fb2a..6385011 100755 (executable)
@@ -46,6 +46,9 @@ done
 DIR="$( cd -P "$( dirname "$SRC" )" >/dev/null && pwd )"
 pushd ${DIR} > /dev/null
 cd ../..
+if [ -z "$USERNAME" ]; then
+    USERNAME=$USER
+fi
 if [ -z "$GITHUB_USERNAME" ]; then
     GITHUB_USERNAME=$USERNAME
     echo "setting GITHUB_USERNAME: ${GITHUB_USERNAME} use -g command line option to change"