p/fuel: ci/deploy.sh: Fix deploy without sudo
[armband.git] / ci / deploy.sh
index 40abe67..1c95d40 100755 (executable)
@@ -9,8 +9,12 @@
 #
 set -e
 
-cd $WORKSPACE
-make submodules-clean submodules-init patches-import
+SCRIPT_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
+
+export ARMBAND_BASE=$(readlink -e ${SCRIPT_DIR}/..)
+
+cd ${WORKSPACE:-${ARMBAND_BASE}}
+make patches-import
 
 # source local environment variables
 if ! [ -z $LAB_CONFIG_URL ]; then
@@ -33,5 +37,6 @@ if ! [ -z $LAB_CONFIG_URL ]; then
     fi
 fi
 
+unset SSH_KEY
 cd upstream/fuel/ci
 ./deploy.sh $@