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