view src/chg @ 1494:9225a90ad7dd

make Doctree a non-virtual class Doctree now is a proper class with it's own implementation. StyleEngine no longer needs to provide the Doctree interface itself. This hopefully make the code easier to understand and should also be a bit faster as no virtual methods are involved.
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Thu, 07 Jan 2010 16:23:05 +0100
parents 6ee11bf9e3ea
children
line wrap: on
line source
#!/bin/sh
#
# Shell script for name changing source code
#

if [ ! $# = 3 ]; then
   echo "Usage: chg <source> <old_word> <new_word>"
   echo "       (this script changes <source> directly)"
   exit 1
fi

if [ ! -r $1 ]; then
   echo "source file ->$1<- doesn't exist..."
   exit 1
fi

if [ ! -r $1.BAK ]; then
   echo "creating backup file: $1.BAK"
   cp $1 $1.BAK
fi

sed "s/$2/$3/g" $1 > out
#sed s/$2/$3/ $1 > out
rm $1
mv out $1
echo "done!"