blob: f32b316cf16360e6a650a20f30afa2cc6f566b14 [file] [log] [blame]
#!/usr/bin/env bash
# script to copy update jars from their staging area to the releases area
# finds file on users path, before current directory
# hence, non-production users can set their own values for test machines
source aggr_properties.shsource
fromDirectory=${stagingDirectory}
toDirectory=${releaseDirectory}
datetimestamp=$1
# make sure 'toDirectory' has been defined and is not zero length
if [ -z "${toDirectory}" ]
then
echo;
echo " Fatal Error: the variable toDirectory must be defined to run this script";
echo;
else
# make sure 'datetimestamp' has been defined and is no zero length
if [ -z "${datetimestamp}" ]
then
echo;
echo " Fatal Error: the variable datetimestamp must be defined to run this script."
echo;
else
toSubDir=${toDirectory}/${datetimestamp}
echo ""
echo " Copying new plugins and features "
echo " from ${fromDirectory}"
echo " to ${toSubDir}"
echo ""
# plugins and features
rsync -rvp ${fromDirectory}${AGGR} ${toSubDir}
# composite artifact and content files
rsync -vp ${fromDirectory}/*.jar ${toSubDir}
# static index page
rsync -vp templateFiles/release/index.html ${toDirectory}
"${BUILD_TOOLS_DIR}"/addRepoProperties-release.sh ${datetimestamp}
# copy standard p2.index page
# We do it last, to use as an indicator file that we are done.
rsync -vp ${fromDirectory}/final/p2.index ${toDirectory}
checkForErrorExit $? "could not copy files as expected"
fi
fi
# remove lock file from hundson build's "pauseAll.sh" script once we are all done.
# remember, we need to _always_ remove the lock file, so do not "exit" from any previous script
rm -vf "${BUILD_HOME}"/lockfile