blob: fe83102f81a40e15c85043e726b1b84c5933fa18 [file] [log] [blame]
#!/bin/sh
# script to run update, setting properties, for all projects
function usage() {
printf "\n\tUsage: %s [-h] | [-v] [-c] -b repoPath" $(basename $0) >&2
printf "\n\t\t%s\n\n" "where h==help, v==verbose, c==clean and s==stream, where steam is Ganymede, Europa, etc" >&2
}
clean=
stream=Ganymede
verbose=
while getopts 'hvcb:' OPTION
do
case $OPTION in
h) usage
exit 1
;;
c) export clean=1
;;
v) export verbose=1
;;
b) export buildrepositorypath=$OPTARG
;;
?) usage
exit 2
;;
esac
done
shift $(($OPTIND - 1))
if [ -z $stream ]
then
echo ""
echo " Need a stream argument"
usage
exit 1
fi
echo " Stream: " $stream
if [ -z $BUILD_INITIALIZED ]
then
source properties.shsource
source parseSiteArg.shsource $stream
export BUILD_INITIALIZED=1
fi
if [ $clean ] ; then
echo " Removing ${testUpdateSite}/features/"
rm -fr ${testUpdateSite}/features/
echo " Removing ${testUpdateSite}/plugins/"
rm -fr ${testUpdateSite}/plugins/
echo " Removing index and site xml files"
rm -fr ${testUpdateSite}/*
fi
echo " Updating index and web site files, but not site xml files (yet)"
rsync -pua ${HOME}/${updateToolsDir}/WebContent/${mainIndexFileName} ${testUpdateSite}/index.html
rsync -pua ${HOME}/${updateToolsDir}/WebContent/*.jpg ${testUpdateSite}
./createMirrorFile.sh -s "$stream" -b "$buildrepositorypath"
if [ "$?" -ne 0 ]
then
exit $?
fi
./ant.sh -f ${fileListFile} -Declipse.home=${eclipseLocation} -Dupdate.site=${testUpdateSite}
if [ "$?" -ne 0 ]
then
exit $?
fi
echo
echo " merge authored site.xml files with the most recent auto generated one"
echo " mainSiteFileName: " ${mainSiteFileName}
echo " testUpdateSite: " ${testUpdateSite}
./runUpdateSiteXmlFiles.sh ${mainSiteFileName} ${testUpdateSite}
if [ "$?" -ne 0 ]
then
exit $?
fi
# do create pack's later ... takes a long time
# ./ant.sh -f createPack200s.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${testUpdateSite}
#if [ "$?" -ne 0 ]
#then
# exit $?
#fi
# run create Digests now, it's a good check if all is well
./ant.sh -f createDigests.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${testUpdateSite}
if [ "$?" -ne 0 ]
then
exit $?
fi
# create P2 repository metadata
./ant.sh -f createP2Repo.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${testUpdateSite}
if [ "$?" -ne 0 ]
then
exit $?
fi