1#!/bin/sh
2while [ "$1" ]
3do
4old="$1"
5new=$(echo "$1" | sed 's/git-/git /')
6echo "Converting '$old' to '$new'"
7git ls-files '*.sh' | while read file
8do
9sed "s/\\<$old\\>/$new/g" < $file > $file.new
10chmod --reference=$file $file.new
11mv $file.new $file
12done
13shift
14done
15git update-index --refresh >& /dev/null
16exit 0