Apex: fix latest rpm path
[releng.git] / jjb / apex / apex-deploy.sh
index 0e39854..3b43dcf 100755 (executable)
@@ -55,7 +55,7 @@ else
       # source the file so we get OPNFV vars
       source opnfv.properties
       RPM_INSTALL_PATH=$(echo $OPNFV_RPM_URL | sed 's/'"$(basename $OPNFV_RPM_URL)"'//')
-      RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL)
+      RPM_LIST=${RPM_INSTALL_PATH}$(basename $OPNFV_RPM_URL)
     fi
 fi
 
@@ -139,8 +139,8 @@ fi
 DEPLOY_CMD="CONFIG=${CONFIG} RESOURCES=${RESOURCES} LIB=${LIB} ${DEPLOY_CMD}"
 
 if [ "$OPNFV_CLEAN" == 'yes' ]; then
-  if [ -f '/root/inventory/pod_settings.yaml' ]; then
-    clean_opts='-f /root/inventory/pod_settings.yaml'
+  if sudo test -e '/root/inventory/pod_settings.yaml'; then
+    clean_opts='-i /root/inventory/pod_settings.yaml'
   else
     clean_opts=''
   fi