/[zanavi_public1]/navit/navit/android/change_xslt.sh
ZANavi

Contents of /navit/navit/android/change_xslt.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (hide annotations) (download) (as text)
Fri Oct 28 21:19:04 2011 UTC (12 years, 5 months ago) by zoff99
File MIME type: application/x-sh
File size: 1763 byte(s)
import files
1 zoff99 2 #! /bin/bash
2     ###########################################
3     #
4     # change android car layout into XSLT for all densities
5     # handle with care!
6     #
7     # Zoff <zoff@zoff.cc> 2011-02-15
8     #
9     ###########################################
10    
11     in="android_layout_default_new.xml"
12     temp="/tmp/temp_layout.tmp"
13     out="android_layout_default_parsed.xml"
14    
15     # setup temp file
16     rm -f "$temp"
17     cp -p "$in" "$temp"
18    
19     REG0='0-{round(@1@-number($LAYOUT_001_ORDER_DELTA_1))}'
20     REG1='{round(@1@-number($LAYOUT_001_ORDER_DELTA_1))}-'
21     REG2='-{round(@1@-number($LAYOUT_001_ORDER_DELTA_1))}'
22     REG3='{round(@1@-number($LAYOUT_001_ORDER_DELTA_1))}-{round(@2@-number($LAYOUT_001_ORDER_DELTA_1))}'
23     REG4='{round(@1@-number($LAYOUT_001_ORDER_DELTA_1))}'
24    
25     for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18;do
26     a=`echo "$REG0"|sed -e "s#@1@#$i#"`
27     cat "$temp"|sed -e "s#order=\"0-${i}\"#order=\"${a}\"#g" > "$out"
28     cp -p "$out" "$temp"
29     done
30    
31     # dont change order="0-" values !!
32     for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18;do
33     a=`echo "$REG1"|sed -e "s#@1@#$i#"`
34     cat "$temp"|sed -e "s#order=\"${i}-\"#order=\"${a}\"#g" > "$out"
35     cp -p "$out" "$temp"
36     done
37    
38     for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18;do
39     a=`echo "$REG2"|sed -e "s#@1@#$i#"`
40     cat "$temp"|sed -e "s#order=\"-${i}\"#order=\"${a}\"#g" > "$out"
41     cp -p "$out" "$temp"
42     done
43    
44    
45     for j in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18;do
46     for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18;do
47     a=`echo "$REG3"|sed -e "s#@1@#$i#"|sed -e "s#@2@#$j#"`
48     cat "$temp"|sed -e "s#order=\"${i}-${j}\"#order=\"${a}\"#g" > "$out"
49     cp -p "$out" "$temp"
50     done
51     done
52    
53     for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18;do
54     a=`echo "$REG4"|sed -e "s#@1@#$i#"`
55     cat "$temp"|sed -e "s#order=\"${i}\"#order=\"${a}\"#g" > "$out"
56     cp -p "$out" "$temp"
57     done
58    

Properties

Name Value
svn:executable *

   
Visit the ZANavi Wiki