Make opnfv.bin executable 79/29379/1
authorAlex Yang <yangyang1@zte.com.cn>
Sat, 25 Feb 2017 10:04:42 +0000 (18:04 +0800)
committerAlex Yang <yangyang1@zte.com.cn>
Sat, 25 Feb 2017 10:04:42 +0000 (18:04 +0800)
The downloaded opnfv.bin file has no executable attribute, although
it has +x in building-job.

Change-Id: I38347db6de2630e0a92106df22b027efa20d4498
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
ci/deploy/deploy.sh

index c3b7805..7f57d01 100755 (executable)
@@ -187,9 +187,12 @@ if [ $DRY_RUN -eq 1 ]; then
     exit 1
 fi
 
-if [ ! -x ${WORKSPACE}/opnfv.bin ]; then
-    echo "opnfv.bin does not exist in WORKSPACE or is not executable, exit."
+if [ ! -f ${WORKSPACE}/opnfv.bin ]; then
+    echo "opnfv.bin does not exist in WORKSPACE, exit."
     exit 1
+elif [ ! -x ${WORKSPACE}/opnfv.bin ]; then
+    echo "opnfv.bin in WORKSPACE is not executable, chmod it and continue."
+    chmod +x ${WORKSPACE}/opnfv.bin
 fi
 
 test -d ${VM_STORAGE} || mkdir -p ${VM_STORAGE}