commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r6433 - trunk/www/utils/sbin


From: jcater
Subject: r6433 - trunk/www/utils/sbin
Date: Thu, 30 Sep 2004 13:10:51 -0500 (CDT)

Author: jcater
Date: 2004-09-30 13:10:50 -0500 (Thu, 30 Sep 2004)
New Revision: 6433

Added:
   trunk/www/utils/sbin/environment
Modified:
   trunk/www/utils/sbin/README
   trunk/www/utils/sbin/create-epydocs
   trunk/www/utils/sbin/create-nightlies
   trunk/www/utils/sbin/update-tasks
Log:
Added shared environment files

Modified: trunk/www/utils/sbin/README
===================================================================
--- trunk/www/utils/sbin/README 2004-09-30 17:59:29 UTC (rev 6432)
+++ trunk/www/utils/sbin/README 2004-09-30 18:10:50 UTC (rev 6433)
@@ -1,2 +1,9 @@
-These scripts are run locally on ash by the "gnue" user. 
+These scripts are run locally on ash to create the website, nightlies, etc.
 
+Notes: 
+ * This utils/sbin/ directory is symlinked as /usr/local/gnue-sandbox/sbin/.
+ * Any scripts here run as the "gnue" user, who has access to the svn 
+   repository and /var/www/.
+ * The gnue user's home is /usr/local/gnue-sandbox, but scripts probably 
+   shouldn't assume this (just in case...)
+

Modified: trunk/www/utils/sbin/create-epydocs
===================================================================
--- trunk/www/utils/sbin/create-epydocs 2004-09-30 17:59:29 UTC (rev 6432)
+++ trunk/www/utils/sbin/create-epydocs 2004-09-30 18:10:50 UTC (rev 6433)
@@ -1,20 +1,19 @@
-#!/bin/sh 
+#!/bin/sh
 
-umask 002 
+umask 002
 
-export BASE=/usr/local/gnue-sandbox
-export CHECKOUT=${BASE}/svn/gnue
-export INSTALLED=${CHECKOUT}/gnue-common/.cvsdevelbase
+# Set common environment
+. /usr/local/gnue-sandbox/sbin/environment
 
 tool=$1
 SRC=${INSTALLED}/gnue/$tool
 
 if [ "$tool" = "" ]
-then 
+then
   echo "Syntax: $0 <tool>"
-fi 
-  
+fi
 
+
 TMPDIR=/tmp/epydoc-$tool-$$
 DESTDIR=/var/www/tools/$tool/docs/api
 
@@ -28,11 +27,11 @@
 
 echo
 
-rm $TMPDIR/*/index.html 
+rm $TMPDIR/*/index.html
 
 for t in public private
 do
-( 
+(
 echo "Converting to PHP ($t)"
 
 cd $TMPDIR/$t
@@ -48,13 +47,13 @@
 
   cat $CHECKOUT/www/misc/epydoc/header.php
 
-  cat "$TMPDIR/$t/$f"  | 
+  cat "$TMPDIR/$t/$f"  |
      tail +11  |
      grep -v '</body>' |
      grep -v '</html>' |
      grep -v 'no&nbsp;frame' |
-     sed -r 's/\.html(.*)">/.php\1">/g;s/<a target="[^"]*"/<a/g'    
-  
+     sed -r 's/\.html(.*)">/.php\1">/g;s/<a target="[^"]*"/<a/g'
+
   cat $CHECKOUT/www/misc/epydoc/footer.php
 
 ) > "$dest"
@@ -70,7 +69,7 @@
 for f in glob.glob('gnue.${tool}*-module.html'):
   if len(string.split(f,'.')) in (3,4):
     name=f.split('-')[0]
-    if len(string.split(name,'.')) == 2: 
+    if len(string.split(name,'.')) == 2:
       sortable.append((name.lower(),'<li><a href="%s">%s</a>\n<ul>' % 
(f.replace('.html','.php'), name)))
     else:
       sortable.append((name.lower(),'<li><a href="%s">%s</a></li>\n' % 
(f.replace('.html','.php'), name.split('.')[-1])))

Modified: trunk/www/utils/sbin/create-nightlies
===================================================================
--- trunk/www/utils/sbin/create-nightlies       2004-09-30 17:59:29 UTC (rev 
6432)
+++ trunk/www/utils/sbin/create-nightlies       2004-09-30 18:10:50 UTC (rev 
6433)
@@ -2,10 +2,8 @@
 
 umask 002
 
-export BASE=/usr/local/gnue-sandbox
-export CHECKOUT=${BASE}/svn/gnue
-export INSTALLED=${CHECKOUT}/gnue-common/.cvsdevelbase
-export PATH="$PATH:$BASE/bin"
+# Set common environment
+. /usr/local/gnue-sandbox/sbin/environment
 
 tool=$1
 

Added: trunk/www/utils/sbin/environment
===================================================================
--- trunk/www/utils/sbin/environment    2004-09-30 17:59:29 UTC (rev 6432)
+++ trunk/www/utils/sbin/environment    2004-09-30 18:10:50 UTC (rev 6433)
@@ -0,0 +1,6 @@
+#!/bin/bash
+export BASE=/usr/local/gnue-sandbox
+export CHECKOUT=${BASE}/svn/gnue
+export INSTALLED=${CHECKOUT}/.cvsdevelbase
+export PATH="$PATH:$BASE/bin"
+


Property changes on: trunk/www/utils/sbin/environment
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/www/utils/sbin/update-tasks
===================================================================
--- trunk/www/utils/sbin/update-tasks   2004-09-30 17:59:29 UTC (rev 6432)
+++ trunk/www/utils/sbin/update-tasks   2004-09-30 18:10:50 UTC (rev 6433)
@@ -11,23 +11,19 @@
 
 umask 002
 
-## Create a lockfile...
+# Set common environment
+. /usr/local/gnue-sandbox/sbin/environment
 
-export BASE=/usr/local/gnue-sandbox
-export CHECKOUT=${BASE}/svn/gnue
-export INSTALLED=${CHECKOUT}/.cvsdevelbase
-#export INSTALLED=${CHECKOUT}/gnue-common/.cvsdevelbase
-
 export NIGHTLIESLOG=/var/www/downloads/snapshots/build.txt
 
 export OUTFILE="/dev/tty"
-export LOGLIST=/tmp/update-website.logs.$$
 export LOCKFILE=/var/spool/update-website/DO-NOT-REMOVE.update-tasks
+export LOGLIST=/tmp/update-website.logs.$$
 echo -n > $LOGLIST
 
 while [ "$1" != "" ]
 do
-  case "$1" in 
+  case "$1" in
      --docs)
        DOCS="yes"
        ;;
@@ -41,16 +37,16 @@
        shift
        MAILTO="$1"
        if [ "$1" = "" ]
-       then 
+       then
          echo "--mailto expects an email address"
-        exit 1
+         exit 1
        fi
        OUTFILE="/tmp/update-website.$$"
        ;;
      --checkout)
        RECHECKOUT="yes"
        ;;
-  esac 
+  esac
   shift
 done
 
@@ -67,12 +63,12 @@
 # Get our svn copy up-to-date
 #
 if [ "$RECHECKOUT" = "yes" ]
-then 
+then
  echo "Checking out svn"
  rm -rf ${CHECKOUT}
- svn co --non-interactive file:///var/svn/gnue/trunk ${CHECKOUT}
+ svn co -q --non-interactive file:///var/svn/gnue/trunk ${CHECKOUT}
 else
- SVNUPDATE="svn update --non-interactive"
+ SVNUPDATE="svn update --non-interactive -q"
  SVNCLEANUP="svn cleanup"
  echo Updating svn...
  # Autogenerated stuff that gets in the way
@@ -83,7 +79,7 @@
  rm -f /var/spool/update-website/signal-* 2>&1
  # Try to update. If that fails, svn clean and try again...
  ($SVNUPDATE || (echo "  (*) Running SVN Cleanup"; $SVNCLEANUP && $SVNUPDATE) 
) || (echo "  (*) Unable to svn update.")
-fi 
+fi
 #
 # Run setup-cvs.py to get a working install in /usr/local/gnue-sandbox/
 #
@@ -106,16 +102,16 @@
 do
  SRC=${INSTALLED}/gnue/${tool}
   echo -n "Performing tasks for ${tool}..."
-  
+
   #
   # Epydoc
   #
   if [ "$DOCS" = 'yes' ]
-  then 
+  then
     echo -n " (epydoc)"
-    (/usr/local/gnue-sandbox/sbin/create-epydocs ${tool}) > 
/tmp/epydoc-${tool}-$$.out 2>&1 
+    (/usr/local/gnue-sandbox/sbin/create-epydocs ${tool}) > 
/tmp/epydoc-${tool}-$$.out 2>&1
     echo /tmp/epydoc-${tool}-$$.out >> $LOGLIST
-  fi 
+  fi
 
   #
   # technotes
@@ -126,7 +122,7 @@
   cp ${CHECKOUT}/gnue-${tool}/doc/technotes/* $TNBASE 2>/dev/null
   (cd $TNDEST && python ${CHECKOUT}/gnue-common/utils/create-technote-index.py)
 
-  # 
+  #
   # Nightlies
   #
   if [ "$NIGHTLIES" = 'yes' ]
@@ -135,7 +131,7 @@
     echo -n " (nightlies)"
     (
        /usr/local/gnue-sandbox/sbin/create-nightlies ${tool}
-    ) > $log 2>&1 
+    ) > $log 2>&1
     echo $log >> $LOGLIST
     (echo; echo
      echo 
"-------------------------------------------------------------------------------"
@@ -157,19 +153,19 @@
 
 # Cleanup/Mail logs
 if [ "$MAILTO" != "" ]
-then 
+then
   for file in `cat $LOGLIST`
   do
     muttarg="$muttarg -a $file"
   done
-  (cat $OUTFILE|/usr/bin/mutt -s "GNUe update-website (`date +'%Y-%m-%d 
%H:%M:%S'`)" $muttarg $MAILTO) && rm -f `cat $LOGLIST` $LOGLIST 
+  (cat $OUTFILE|/usr/bin/mutt -s "GNUe update-website (`date +'%Y-%m-%d 
%H:%M:%S'`)" $muttarg $MAILTO) && rm -f `cat $LOGLIST` $LOGLIST
 else
   if [ -s "$LOGLIST" ]
-  then 
+  then
     echo
     echo "The following logfiles were created. They will be kept for 5 days"
     cat $LOGLIST|sed 's/^/  - /g'
-  fi 
+  fi
   rm -f $LOGLIST
-fi 
+fi
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]