diff options
author | Frans Pop <elendil@planet.nl> | 2006-08-07 21:44:55 +0000 |
---|---|---|
committer | Frans Pop <elendil@planet.nl> | 2006-08-07 21:44:55 +0000 |
commit | 5cc529cd0bb2f4a78777f6f15ee09cbcc35d1496 (patch) | |
tree | b4b8bf249c2cc9deb417d4472f21716e3e20d225 /scripts | |
parent | 34301d822cbc8eee37ba92da93d9d528f0d82e12 (diff) | |
download | installation-guide-5cc529cd0bb2f4a78777f6f15ee09cbcc35d1496.zip |
New script to help with renaming a file for all translations
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/xml-rename | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/xml-rename b/scripts/xml-rename new file mode 100755 index 000000000..0f7f2af23 --- /dev/null +++ b/scripts/xml-rename @@ -0,0 +1,26 @@ +#! /bin/bash + +# This script can be used to rename an xml file or directory for all +# translations. +# (Script could be expanded to really move to another location.) + +SOURCE="$1" +NEWNAME="$2" + +[ "$SOURCE" ] || exit 1 +[ "$NEWNAME" ] || exit 1 + + +if [ ! -e "en/$SOURCE" ]; then + echo "Source file does not exist" + exit 1 +fi +if echo "$NEWNAME" | grep -q "/"; then + echo "New name may not contain a directory" + exit 1 +fi + +for FILE in */$SOURCE; do + FDIR="$(dirname $FILE)" + svn mv $FILE $FDIR/$NEWNAME +done |