]> git.lyx.org Git - lyx.git/commitdiff
Script for automatic updating of ui and bind files.
authorRichard Heck <rgheck@comcast.net>
Tue, 18 Jan 2011 15:41:16 +0000 (15:41 +0000)
committerRichard Heck <rgheck@comcast.net>
Tue, 18 Jan 2011 15:41:16 +0000 (15:41 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37252 a592a061-630c-0410-9148-cb99ea01b6c8

development/tools/updatelfuns.sh [new file with mode: 0644]

diff --git a/development/tools/updatelfuns.sh b/development/tools/updatelfuns.sh
new file mode 100644 (file)
index 0000000..04c8c02
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+function do_convert {
+       for i in *; do 
+               if [ ! -f $i ]; then continue; fi
+               cp $i $i.old; 
+               python $lyxdir/lib/scripts/prefs2prefs.py -l <$i.old >$i; 
+       done
+}
+
+# find out where we are relative to the program directory
+curdir=$(pwd);
+progloc=$0;
+pathto=${progloc%/*};
+# get us into development/tools
+if [ "$progloc" != "$pathto" ]; then
+       if ! cd $pathto; then
+       echo "Couldn't get to development/tools!";
+       exit 1;
+       fi
+fi
+
+curdir=`pwd`;
+lyxdir=${curdir%/development/tools*};
+
+if ! cd $lyxdir/lib/ui/; then
+       echo "Couldn't get to lib/ui!";
+       exit 1;
+fi
+
+do_convert;
+
+if ! cd $lyxdir/lib/bind/; then
+       echo "Couldn't get to lib/bind!";
+       exit 1;
+fi
+
+do_convert;
+
+#now do the subdirectories
+for d in *; do 
+       if [ ! -d $d ]; then continue; fi
+       cd $d;
+       do_convert;
+       cd ..;
+done