[26526] trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed Jun 27 12:09:34 PDT 2007


Revision: 26526
          http://trac.macosforge.org/projects/macports/changeset/26526
Author:   dluke at macports.org
Date:     2007-06-27 12:09:34 -0700 (Wed, 27 Jun 2007)

Log Message:
-----------
Adding script for automatic regen of macports guide from svn sources.

Added Paths:
-----------
    trunk/base/portmgr/GuideRegen.sh

Property Changed:
----------------
    trunk/


Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 023a8b07-a327-4f20-9012-67c915bb7b7c:/local/branches/updates:21118
023a8b07-a327-4f20-9012-67c915bb7b7c:/local/trunk:21326
40426cdb-d25d-4106-b89a-567fc1e9311f:/local/trunk:22799
a2b01108-8822-4c85-91cd-1541804339d8:/local/macports:20632
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/libdnet-maintainer:20898
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/p5-app-cli:20923
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/p5-list-moreutils:20919
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/p5-path-class:20929
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/updates:20946
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/trunk:20947
d9146071-5dc1-4620-afc7-8ba4e23d31df:/local/trunk:21690
e4b2a6a8-e742-4924-8f8a-3771363e925e:/local/trunk:25771
f2dd1c64-7982-4318-98ce-263798263e0a:/local:26366
fd7794eb-1723-4a49-8be4-c69b2a184b6d:/local/trunk:24020
   + 023a8b07-a327-4f20-9012-67c915bb7b7c:/local/branches/updates:21118
023a8b07-a327-4f20-9012-67c915bb7b7c:/local/trunk:21326
40426cdb-d25d-4106-b89a-567fc1e9311f:/local/trunk:22799
a2b01108-8822-4c85-91cd-1541804339d8:/local/macports:20632
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/libdnet-maintainer:20898
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/p5-app-cli:20923
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/p5-list-moreutils:20919
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/p5-path-class:20929
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/updates:20946
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/trunk:20947
d9146071-5dc1-4620-afc7-8ba4e23d31df:/local/trunk:21690
e4b2a6a8-e742-4924-8f8a-3771363e925e:/local/trunk:25771
f2dd1c64-7982-4318-98ce-263798263e0a:/local:26799
fd7794eb-1723-4a49-8be4-c69b2a184b6d:/local/trunk:24020

Added: trunk/base/portmgr/GuideRegen.sh
===================================================================
--- trunk/base/portmgr/GuideRegen.sh	                        (rev 0)
+++ trunk/base/portmgr/GuideRegen.sh	2007-06-27 19:09:34 UTC (rev 26526)
@@ -0,0 +1,92 @@
+#!/bin/bash
+
+####
+# Guide regen automation script.
+# Created by Daniel J. Luke
+# e-mail: dluke at geeklair.net
+# Based on IndexRegen.sh
+# $Id$
+####
+
+# 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
+# e-mail address to spam in case of failure.
+SPAM_LOVERS=macports-mgr at lists.macosforge.org,dluke at geeklair.net
+
+# Other settings (probably don't need to be changed).
+SVN_CONFIG_DIR=${ROOT}/svnconfig
+REPO_BASE=http://svn.macports.org/repository/macports
+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
+# Where MP installs darwinports1.0. This gets created.
+# 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
+# Commit message.
+COMMIT_MSG=${ROOT}/commit.msg
+# The date.
+DATE=$(date +'%A %Y-%m-%d at %H:%M:%S')
+
+
+# Function to spam people in charge if something goes wrong during indexing.
+bail () {
+    mail -s "Guide regen Failure on ${DATE}" $SPAM_LOVERS < $FAILURE_LOG
+    cleanup; exit 1
+}
+
+# Cleanup fuction for runtime files.
+cleanup () {
+    rm -f $COMMIT_MSG $FAILURE_LOG
+    rm -f $LOCKFILE
+}
+
+
+if [ ! -e $LOCKFILE ]; then
+    touch $LOCKFILE
+else
+    echo "Guide regen lockfile found, is another index regen running?"
+    exit 1
+fi
+
+# Checkout/update the doc tree
+if [ -d ${SRCTREE}/doc ]; then
+    $SVN update ${SRCTREE}/doc > $FAILURE_LOG 2>&1 \
+        || { echo "Updating the doc tree from $REPO_BASE/trunk/doc failed." >> $FAILURE_LOG; bail ; }
+else
+    $SVN checkout ${REPO_BASE}/trunk/doc ${SRCTREE}/doc > $FAILURE_LOG 2>&1 \
+        || { echo "Checking out the doc tree from $REPO_BASE/trunk/s failed." >> $FAILURE_LOG; bail ; }
+fi
+
+# Checkout/update HEAD
+if [ -d ${SRCTREE}/base ]; then
+    $SVN update ${SRCTREE}/base > $FAILURE_LOG 2>&1 \
+        || { echo "Updating the trunk from $REPO_BASE/trunk/base failed." >> $FAILURE_LOG; bail ; }
+else
+    $SVN checkout ${REPO_BASE}/trunk/base ${SRCTREE}/base > $FAILURE_LOG 2>&1 \
+        || { echo "Checking out the trunk from $REPO_BASE/trunk/base failed." >> $FAILURE_LOG; bail ; }
+fi
+
+# (re)configure.
+cd ${SRCTREE}/base/ && \
+    ./configure \
+    --prefix=${PREFIX} \
+    --with-install-user=${MP_USER} \
+    --with-install-group=${MP_GROUP} > $FAILURE_LOG 2>&1 \
+    || { echo "./configure script failed." >> $FAILURE_LOG ; bail ; }
+
+# (re)build
+{ cd ${SRCTREE}/doc/guide && make xhtml > $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.
+cleanup


Property changes on: trunk/base/portmgr/GuideRegen.sh
___________________________________________________________________
Name: svn:executable
   + *

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


More information about the macports-changes mailing list