[pisa-src] r1617 - trunk/tools/subversion/pisa_runautobuild

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Tue, 10 Nov 2009 17:35:47 +0100

Author: biurrun
Date: Tue Nov 10 17:35:46 2009
New Revision: 1617

Log:
autobuild: Perform a self-update if the script in the repository has changed.

Modified:
   trunk/tools/subversion/pisa_runautobuild

Modified: trunk/tools/subversion/pisa_runautobuild
==============================================================================
--- trunk/tools/subversion/pisa_runautobuild    Tue Nov 10 17:15:34 2009        
(r1616)
+++ trunk/tools/subversion/pisa_runautobuild    Tue Nov 10 17:35:46 2009        
(r1617)
@@ -12,6 +12,7 @@
 
 PISA_HEAD_REVISION=$(svnlook youngest $LOCAL_SVN_PATH)
 AUTOBUILD_REVISION=$(cat $BUILD_DIR/PISA_HEAD_REVISION)
+AUTOBUILD_SCRIPT="$CHECKOUT_DIR/tools/subversion/pisa_runautobuild"
 
 # helper functions
 run_program()
@@ -43,6 +44,13 @@
 
 svn co -q $URL_SVN_PATH "$CHECKOUT_DIR"
 
+# Perform a self-update if the autobuild script in the repository has changed.
+if ! cmp -s "$0" "$AUTOBUILD_SCRIPT" ; then
+    cat "$AUTOBUILD_SCRIPT" > $0
+    rm -rf "$CHECKOUT_DIR"
+    exec $0
+fi
+
 cd "$CHECKOUT_DIR"
 
 # Compile PISA in different configurations

Other related posts:

  • » [pisa-src] r1617 - trunk/tools/subversion/pisa_runautobuild - Diego Biurrun