]> git.lyx.org Git - lyx.git/blob - development/tools/updatelayouts.sh
Simple bash script to update all layouts to current format.
[lyx.git] / development / tools / updatelayouts.sh
1 #!/bin/bash
2
3 # find out where we are relative to the program directory
4 curdir=$(pwd);
5 progloc=$0;
6 pathto=${progloc%/*};
7 # get us into development/tools
8 if [ "$progloc" != "$pathto" ]; then
9   if ! cd $pathto; then
10         echo "Couldn't get to development/tools!";
11         exit 1;
12   fi
13 fi
14
15 if ! cd ../../lib/layouts/; then
16   echo "Couldn't get to lib/layouts!";
17   exit 1;
18 fi
19
20 for i in *; do 
21   cp $i $i.old; 
22   python ../scripts/layout2layout.py <$i.old >$i; 
23 done