#!/usr/bin/env sh # # 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 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 <