]> git.lyx.org Git - features.git/commitdiff
Simple bash script to update all layouts to current format.
authorRichard Heck <rgheck@comcast.net>
Sun, 6 Dec 2009 03:30:24 +0000 (03:30 +0000)
committerRichard Heck <rgheck@comcast.net>
Sun, 6 Dec 2009 03:30:24 +0000 (03:30 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32372 a592a061-630c-0410-9148-cb99ea01b6c8

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

diff --git a/development/tools/updatelayouts.sh b/development/tools/updatelayouts.sh
new file mode 100644 (file)
index 0000000..7a15a58
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# 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
+
+if ! cd ../../lib/layouts/; then
+  echo "Couldn't get to lib/layouts!";
+  exit 1;
+fi
+
+for i in *; do 
+  cp $i $i.old; 
+  python ../scripts/layout2layout.py <$i.old >$i; 
+done