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