diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2010-01-02 20:56:35 +0100 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2010-01-02 20:56:35 +0100 |
commit | 64c458487151933ee0ba093cf4ac69e177d9be37 (patch) | |
tree | f6e3755704f53406eea85532e4ffe5d5ef50b7f0 /bin/restore.sh | |
parent | 2aec9cc58398cac1376509a7d75edb83b41f984e (diff) | |
parent | 72c578fd4b0b4a5a43e18594339ac4ff26c376dc (diff) |
Merge commit 'upstream/1.2.0.d20091224'
Diffstat (limited to 'bin/restore.sh')
-rw-r--r-- | bin/restore.sh | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/bin/restore.sh b/bin/restore.sh new file mode 100644 index 0000000..a5da9e8 --- /dev/null +++ b/bin/restore.sh @@ -0,0 +1,90 @@ +#!/usr/bin/env sh +# +# Simple hack script to restore __revision__, __COPYRIGHT_, 1.2.0.d20091224 +# and other similar variables to what gets checked in to source. This +# comes in handy when people send in diffs based on the released source. +# + +if test "X$*" = "X"; then + DIRS="src test" +else + DIRS="$*" +fi + +SEPARATOR="================================================================================" + +header() { + arg_space="$1 " + dots=`echo "$arg_space" | sed 's/./\./g'` + echo "$SEPARATOR" | sed "s;$dots;$arg_space;" +} + +for i in `find $DIRS -name '*.py'`; do + header $i + ed $i <<EOF +g/Copyright (c) 2001.*SCons Foundation/s//Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation/p +w +/^__revision__ = /s/= .*/= "bin/restore.sh 4577 2009/12/27 19:44:43 scons"/p +w +q +EOF +done + +for i in `find $DIRS -name 'scons.bat'`; do + header $i + ed $i <<EOF +g/Copyright (c) 2001.*SCons Foundation/s//Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation/p +w +/^@REM src\/script\/scons.bat/s/@REM .* knight/@REM bin/restore.sh 4577 2009/12/27 19:44:43 scons/p +w +q +EOF +done + +for i in `find $DIRS -name '__init__.py' -o -name 'scons.py' -o -name 'sconsign.py'`; do + header $i + ed $i <<EOF +/^__version__ = /s/= .*/= "1.2.0.d20091224"/p +w +/^__build__ = /s/= .*/= "r4577[MODIFIED]"/p +w +/^__buildsys__ = /s/= .*/= "scons-dev"/p +w +/^__date__ = /s/= .*/= "2009/12/27 19:44:43"/p +w +/^__developer__ = /s/= .*/= "scons"/p +w +q +EOF +done + +for i in `find $DIRS -name 'setup.py'`; do + header $i + ed $i <<EOF +/^ *version = /s/= .*/= "1.2.0.d20091224",/p +w +q +EOF +done + +for i in `find $DIRS -name '*.txt'`; do + header $i + ed $i <<EOF +g/Copyright (c) 2001.*SCons Foundation/s//Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation/p +w +/# [^ ]* 0.96.[CD][0-9]* [0-9\/]* [0-9:]* knight$/s/.*/# bin/restore.sh 4577 2009/12/27 19:44:43 scons/p +w +/Version [0-9][0-9]*\.[0-9][0-9]*/s//Version 1.2.0.d20091224/p +w +q +EOF +done + +for i in `find $DIRS -name '*.xml'`; do + header $i + ed $i <<EOF +g/Copyright (c) 2001.*SCons Foundation/s//Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation/p +w +q +EOF +done |