summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrans Pop <elendil@planet.nl>2006-08-07 21:44:55 +0000
committerFrans Pop <elendil@planet.nl>2006-08-07 21:44:55 +0000
commit5cc529cd0bb2f4a78777f6f15ee09cbcc35d1496 (patch)
treeb4b8bf249c2cc9deb417d4472f21716e3e20d225
parent34301d822cbc8eee37ba92da93d9d528f0d82e12 (diff)
downloadinstallation-guide-5cc529cd0bb2f4a78777f6f15ee09cbcc35d1496.zip
New script to help with renaming a file for all translations
-rwxr-xr-xscripts/xml-rename26
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