From a7e07682839872ba4d903d09c8af19ba5432e83e Mon Sep 17 00:00:00 2001 From: stevenknight Date: Sun, 18 Dec 2005 16:22:43 +0000 Subject: [PATCH] Update the bin/restore.sh script for more complete conversion of substituted __*__ variables. Put proper __COPYRIGHT__ and __revision__ templates in LaTeXTests.py. git-svn-id: http://scons.tigris.org/svn/scons/trunk@1405 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- bin/restore.sh | 70 ++++++++++++++++++++++---- src/engine/SCons/Scanner/LaTeXTests.py | 4 +- 2 files changed, 63 insertions(+), 11 deletions(-) diff --git a/bin/restore.sh b/bin/restore.sh index d23d1d0c..0ed181df 100644 --- a/bin/restore.sh +++ b/bin/restore.sh @@ -1,8 +1,8 @@ #!/usr/bin/env sh # -# Simple hack script to restore __revision__ and __COPYRIGHT_ lines -# to what gets checked in to source. This comes in handy when people -# send in diffs based on the released source. +# Simple hack script to restore __revision__, __COPYRIGHT_, __VERSION__ +# 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 @@ -11,27 +11,79 @@ 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 -ed $i <$/s/.*//p + header $i + ed $i <