cron-nightly.sh revision 10140
10140N/A# 30 1 * * 1-5 /usr/sbin/chroot /path/to/jail/root /usr/bin/su - gbuild -c ". /jds/cbe/bin/env.sh; I_KNOW_WHAT_IM_DOING=yes myEnv=nightly-beijing.env $0"
10140N/A# 30 1 * * 1-5 . /jds/cbe/bin/env.sh; thisSpec=SUNWTiff.spec I_KNOW_WHAT_IM_DOING=yes myEnv=nightly-beijing.env $0
10140N/A# cron-script.sh, original script
10140N/A# based on the original script, created cron-nightly.sh
10140N/A# - took all site-dependent variable declarations out of the script and adopted it to use env file
10140N/A# - added support for building individual components (must specify spec file), useful for debugging and others..
10140N/A /tmp/$shortName.copy.* )
10140N/A if ! /usr/bin/cmp -s $SPECDIR/$shortName $MYNAME; then exec $SPECDIR/$shortName; fi
10140N/A while [ -d $WEBROOT/$NEW_LOGDIR ]; do
10140N/A --summary-title="${PRODNAME} S${OSrel}/${OSarch_full} Nightly Build Report `date +'%d %B %Y'`" \
10140N/A echo '' | rsh $RHOST -l $RUSER "rm -rf $RPMSDIR.prev; mv $RPMSDIR $RPMSDIR.prev; mkdir -p $RPMSDIR"
10140N/A /sgnome/tools/re-scripts/jds-build/make-jds-dist /jds/packages/PKGS /jds/dist nightly- > /dev/null 2>&1
10140N/A echo '' | rcp -r /jds/dist/nightly-/${OSarch_full}/* /jds/dist/nightly-/${OSarch_full}/.??* ${RUSER}@${RHOST}:$RPMSDIR
10140N/A echo '' | rsh $RHOST -l $RUSER "mkdir -p $RPMSDIR/all_pkgs && cd $RPMSDIR/all_pkgs && ln -s ../*/*.tar.gz ."
10140N/A export ALL_REPORTS
10140N/A ( echo "<A HREF=$LOGDIR_BASE_URL/$LOGDIR.html>$DIR_DATE</A> $FAILED package(s) failed<BR>"; \
10140N/A mailx -s "${PRODNAME} S${OSrel} ${OSarch_full} nightly build: $FAILED pkgs failed" $EMAIL_NOTIFICATION