- deleted the "pupdev" pseudo-anonymous CVS account
authorMark Huang <mlhuang@cs.princeton.edu>
Thu, 5 Aug 2004 22:43:51 +0000 (22:43 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Thu, 5 Aug 2004 22:43:51 +0000 (22:43 +0000)
- populate the alpha node repository with new RPMs every night

build.sh

index c5e56c7..9a5f459 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -4,15 +4,20 @@
 # crontabs to build nightly releases (default). Can also be invoked
 # manually to build a tagged release (-r) in the current directory.
 #
-# $Id: build.sh,v 1.4 2004/05/26 18:50:15 mlh-pl_rpm Exp $
+# $Id: build.sh,v 1.5 2004/06/09 14:46:04 mlh-pl_rpm Exp $
 #
 
 # Set defaults
-CVSROOT=pup-pl_rpm@cvs.planet-lab.org:/cvs
+CVSROOT=bui-pl_rpm@cvs.planet-lab.org:/cvs
 CVS_RSH=ssh
 MODULE=rpm
 TAG=HEAD
 
+# Alpha node repository
+ALPHA_BOOT=build@boot.planet-lab.org
+ALPHA_ROOT=/www/planetlab/install-rpms/archive/planetlab-alpha
+ALPHA_RPMS=/www/planetlab/install-rpms/planetlab-alpha
+
 # Export certain variables
 export CVS_RSH
 
@@ -51,11 +56,20 @@ cvs -d ${CVSROOT} export -r ${TAG} -d ${BASE} ${MODULE}
 make -C ${BASE}
 ) >${BASE}/log 2>&1
 
-# Dump log
 if [ $? -ne 0 ] ; then
+    # Dump log
     if [ -f ${BASE}/log ] ; then
        tail -100 ${BASE}/log
     else
        echo "Error $?"
     fi
+elif [ "$TAG" = "HEAD" ] ; then
+    # Update alpha node repository
+    for i in RPMS SRPMS ; do
+       ssh ${ALPHA_BOOT} mkdir -p ${ALPHA_ROOT}/${BASE}/${i}
+       find ${BASE}/${i} -type f | xargs -i scp {} ${ALPHA_BOOT}:${ALPHA_ROOT}/${BASE}/${i}
+       ssh ${ALPHA_BOOT} yum-arch ${ALPHA_ROOT}/${BASE}/${i}
+    done
+    # Update symlink
+    ssh ${ALPHA_BOOT} ln -nsf ${ALPHA_ROOT}/${BASE}/RPMS/ ${ALPHA_RPMS}
 fi