Merge "Configure integration scripts to use Nexus proxy"
[releng/builder.git] / jjb / integration / include-raw-integration-deploy-controller-run-test.sh
index 053fe9a04083a110cd7fe11ba702393cbbe0a742..1be01ad35daa6aa532b2b55b3a0602a5db4edf86 100644 (file)
@@ -22,11 +22,9 @@ if [ ${BUNDLEURL} == 'last' ]; then
     BUNDLE="distribution-${DISTRIBUTION}-${TIMESTAMP}.zip"
     BUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}"
 else
-    BUNDLE="$(echo ${BUNDLEURL} | awk -F '/' '{ print $(NF) }')"
-    echo "Finding out Bundle folder..."
-    wget --no-verbose  ${BUNDLEURL}
-    BUNDLEFOLDER="$(unzip -qql ${BUNDLE} | head -n1 | tr -s ' ' | cut -d' ' -f5- | rev | cut -c 2- | rev)"
-    rm ${BUNDLE}
+    BUNDLE="${BUNDLEURL##*/}"
+    BUNDLEVERSION="$(basename $(dirname $BUNDLEURL))"
+    BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}"
 fi
 
 echo "Distribution bundle URL is ${BUNDLEURL}"
@@ -34,9 +32,9 @@ echo "Distribution bundle is ${BUNDLE}"
 echo "Distribution folder is ${BUNDLEFOLDER}"
 
 cat > ${WORKSPACE}/controller-script.sh <<EOF
-echo "Downloading the distribution from ${BUNDLEURL}"
+echo "Downloading the distribution..."
 cd /tmp
-wget --no-verbose  ${BUNDLEURL}
+wget --no-verbose '${BUNDLEURL}'
 
 echo "Extracting the new controller..."
 unzip -q ${BUNDLE}