[jbosstools-commits] JBoss Tools SVN: r41829 - branches/jbosstools-3.3.x/build/publish.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Jun 8 14:04:33 EDT 2012


Author: nickboldt
Date: 2012-06-08 14:04:32 -0400 (Fri, 08 Jun 2012)
New Revision: 41829

Modified:
   branches/jbosstools-3.3.x/build/publish/publish.sh
Log:
ensure script is running in the right place using pushd/popd instead of cd

Modified: branches/jbosstools-3.3.x/build/publish/publish.sh
===================================================================
--- branches/jbosstools-3.3.x/build/publish/publish.sh	2012-06-08 17:38:32 UTC (rev 41828)
+++ branches/jbosstools-3.3.x/build/publish/publish.sh	2012-06-08 18:04:32 UTC (rev 41829)
@@ -63,10 +63,9 @@
 	else
 	 siteZip=${WORKSPACE}/sources/site/target/repository.zip
 	 # JBIDE-10923
-	 currentDir=$(pwd)
-	 cd ${WORKSPACE}/sources/site/target/repository
+	 pushd ${WORKSPACE}/sources/site/target/repository >/dev/null
 	 zip -r $siteZip .
-	 cd $currentDir
+	 popd >/dev/null
 	fi
 	z=$siteZip
 fi
@@ -174,9 +173,10 @@
 	mkdir -p ${STAGINGDIR}/installer/
 	rsync -aq $z ${z}.MD5 ${STAGINGDIR}/installer/
 	# [fix for DEPRECATED PDE installer build] provide symlink so that the .product build can find the sources zip using a generic name, where SRCSNAME = ${JOB_NAME}-Sources-${ZIPSUFFIX}.zip
-	mkdir -p ${STAGINGDIR}/all; cd ${STAGINGDIR}/all
-	ln -s ../installer/${z} ${SRCSNAME}
-	ln -s ../installer/${z}.MD5 ${SRCSNAME}.MD5
+	mkdir -p ${STAGINGDIR}/all; pushd ${STAGINGDIR}/all >/dev/null
+	ln -s ../installer/${z##*/} ${SRCSNAME}
+	ln -s ../installer/${z##*/}.MD5 ${SRCSNAME}.MD5
+	popd >/dev/null
 	foundSourcesZip=1
 done
 if [[ $foundSourcesZip -eq 0 ]]; then
@@ -247,6 +247,7 @@
 echo ""  >> ${STAGINGDIR}/logs/${METAFILE}
 
 # generate md5sums in a single file 
+pushd ${STAGINGDIR} >/dev/null
 md5sumsFile=${STAGINGDIR}/logs/md5sums.txt
 echo "# Update Site Zips" > ${md5sumsFile}
 echo "# ----------------" >> ${md5sumsFile}
@@ -256,6 +257,7 @@
 echo "# -----------" >> ${md5sumsFile}
 md5sum $(find . -iname "*source*.zip" | egrep -v "aggregate-Sources|nightly-Update") >> ${md5sumsFile}
 echo " " >> ${md5sumsFile}
+popd >/dev/null
 
 mkdir -p ${STAGINGDIR}/logs
 



More information about the jbosstools-commits mailing list