From 4d42bf663f2d069c8dc52ccc3130af9b8c84edae Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Sun, 18 Dec 2005 16:22:43 +0000 Subject: Update the bin/restore.sh script for more complete conversion of substituted __*__ variables. Put proper __COPYRIGHT__ and __revision__ templates in LaTeXTests.py. --- 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 d23d1d0..0ed181d 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 <