3 # Simple hack script to restore __revision__, __COPYRIGHT_, __VERSION__
4 # and other similar variables to what gets checked in to source. This
5 # comes in handy when people send in diffs based on the released source.
8 if test "X$*" = "X"; then
14 SEPARATOR
="================================================================================"
18 dots
=`echo "$arg_space" | sed 's/./\./g'`
19 echo "$SEPARATOR" |
sed "s;$dots;$arg_space;"
22 for i
in `find $DIRS -name '*.py'`; do
25 g/Copyright (c) 2001.*SCons Foundation/s//__COPYRIGHT__/p
27 /^__revision__ = /s/= .*/= "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"/p
33 for i
in `find $DIRS -name 'scons.bat'`; do
36 g/Copyright (c) 2001.*SCons Foundation/s//__COPYRIGHT__/p
38 /^@REM src\/script\/scons.bat/s/@REM .* knight/@REM __FILE__ __REVISION__ __DATE__ __DEVELOPER__/p
44 for i
in `find $DIRS -name '__init__.py' -o -name 'scons.py' -o -name 'sconsign.py'`; do
47 /^__version__ = /s/= .*/= "__VERSION__"/p
49 /^__build__ = /s/= .*/= "__BUILD__"/p
51 /^__buildsys__ = /s/= .*/= "__BUILDSYS__"/p
53 /^__date__ = /s/= .*/= "__DATE__"/p
55 /^__developer__ = /s/= .*/= "__DEVELOPER__"/p
61 for i
in `find $DIRS -name 'setup.py'`; do
64 /^ *version = /s/= .*/= "__VERSION__",/p
70 for i
in `find $DIRS -name '*.txt'`; do
73 g/Copyright (c) 2001.*SCons Foundation/s//__COPYRIGHT__/p
75 /# [^ ]* 0.96.[CD][0-9]* [0-9\/]* [0-9:]* knight$/s/.*/# __FILE__ __REVISION__ __DATE__ __DEVELOPER__/p
77 /Version [0-9][0-9]*\.[0-9][0-9]*/s//Version __VERSION__/p
83 for i
in `find $DIRS -name '*.xml'`; do
86 g/Copyright (c) 2001.*SCons Foundation/s//__COPYRIGHT__/p