[32206] trunk/base/portmgr/jobs/GuideRegen.sh

wsiegrist at apple.com wsiegrist at apple.com
Wed Dec 19 16:31:34 PST 2007


Revision: 32206
          http://trac.macosforge.org/projects/macports/changeset/32206
Author:   wsiegrist at apple.com
Date:     2007-12-19 16:31:31 -0800 (Wed, 19 Dec 2007)

Log Message:
-----------
generalized script to /tmp/mpdocs instead of /Users/... Also removed any PATH assumptions. Added MacOSForge sysadmin to the mail address list.

Modified Paths:
--------------
    trunk/base/portmgr/jobs/GuideRegen.sh

Modified: trunk/base/portmgr/jobs/GuideRegen.sh
===================================================================
--- trunk/base/portmgr/jobs/GuideRegen.sh	2007-12-19 23:03:56 UTC (rev 32205)
+++ trunk/base/portmgr/jobs/GuideRegen.sh	2007-12-20 00:31:31 UTC (rev 32206)
@@ -11,13 +11,9 @@
 # Configuration
 LOCKFILE=/tmp/.mp_svn_guide_regen.lock
 # ROOT directory, where everything is. This needs to exist!
-ROOT=/Users/mp-user/mp_svn_guide_regen
-# MP user.
-MP_USER=mp-user
-# MP group.
-MP_GROUP=mp-user
+ROOT=/tmp/mpdocs
 # e-mail address to spam in case of failure.
-SPAM_LOVERS=macports-dev at lists.macosforge.org,dluke at geeklair.net,markd at macports.org
+SPAM_LOVERS=macports-dev at lists.macosforge.org,dluke at geeklair.net,markd at macports.org,wsiegrist at apple.com
 
 # Other settings (probably don't need to be changed).
 SVN_CONFIG_DIR=${ROOT}/svnconfig
@@ -25,30 +21,32 @@
 SVN="/opt/local/bin/svn -q --non-interactive --config-dir $SVN_CONFIG_DIR"
 # Where to checkout the source code. This needs to exist!
 SRCTREE=${ROOT}/source
-# Where MP will install its world. This gets created.
-PREFIX=/opt/local
-# Path.
-PATH=${PREFIX}/bin:/bin:/usr/bin:/usr/sbin:/opt/local/bin
 # Log for the e-mail in case of failure.
 FAILURE_LOG=${ROOT}/guide_failure.log
 # The date.
-DATE=$(date +'%A %Y-%m-%d at %H:%M:%S')
+DATE=$(/bin/date +'%A %Y-%m-%d at %H:%M:%S')
 
+# Where to find the binaries we need
+MAIL=/usr/bin/mail
+RM=/bin/rm
+TOUCH=/usr/bin/touch
+MAKE=/usr/bin/make
+MKDIR=/bin/mkdir
 
 # Function to spam people in charge if something goes wrong during guide regen.
 bail () {
-    mail -s "Guide Regen Failure on ${DATE}" $SPAM_LOVERS < $FAILURE_LOG
+    $MAIL -s "Guide Regen Failure on ${DATE}" $SPAM_LOVERS < $FAILURE_LOG
     cleanup; exit 1
 }
 
 # Cleanup fuction for runtime files.
 cleanup () {
-    rm -f $FAILURE_LOG $LOCKFILE
+    $RM -f $FAILURE_LOG $LOCKFILE
 }
 
 
 if [ ! -e $LOCKFILE ]; then
-    touch $LOCKFILE
+    $TOUCH $LOCKFILE
 else
     echo "Guide Regen lockfile found, is another regen job running?"
     exit 1
@@ -59,12 +57,13 @@
     $SVN update ${SRCTREE}/doc-new > $FAILURE_LOG 2>&1 \
         || { echo "Updating the doc tree from $REPO_BASE/trunk/doc-new failed." >> $FAILURE_LOG; bail ; }
 else
+    $MKDIR -p ${SRCTREE}/doc-new
     $SVN checkout ${REPO_BASE}/trunk/doc-new ${SRCTREE}/doc-new > $FAILURE_LOG 2>&1 \
         || { echo "Checking out the doc tree from $REPO_BASE/trunk/doc-new failed." >> $FAILURE_LOG; bail ; }
 fi
 
 # (re)build
-{ cd ${SRCTREE}/doc-new && make guide > $FAILURE_LOG 2>&1 ; } \
+{ cd ${SRCTREE}/doc-new && $MAKE guide > $FAILURE_LOG 2>&1 ; } \
     || { echo "make failed." >> $FAILURE_LOG ; bail ; }
 
 # At this point the guide was regen'd successfuly, so we cleanup before we exit.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071219/dc40641a/attachment.html


More information about the macports-changes mailing list