You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
326 B

#!/bin/sh
while [ "$1" ]
do
old="$1"
new=$(echo "$1" | sed 's/git-/git /')
echo "Converting '$old' to '$new'"
git ls-files '*.sh' | while read file
do
sed "s/\\<$old\\>/$new/g" < $file > $file.new
chmod --reference=$file $file.new
mv $file.new $file
done
shift
done
git update-index --refresh >& /dev/null
exit 0