-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostproc.sh
executable file
·150 lines (138 loc) · 5.02 KB
/
postproc.sh
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#!/usr/bin/env bash
cd data
tar -hcvzf ../module/data.tar.gz * >/dev/null
cd ..
cd module
string="
<select1 ref=\"Entity_Types\">
<label>\{Entity_Types\}<\/label>
<item>
<label>Options not loaded<\/label>
<value>Options not loaded<\/value>
<\/item>
<\/select1>"
replacement="
<group ref=\"Colgroup_1\" faims_style=\"orientation\">
<label\/>
<group ref=\"Col_0\" faims_style=\"even\">
<label\/>
<select1 ref=\"Entity_Types\">
<label>\{Entity_Types\}<\/label>
<item>
<label>Options not loaded<\/label>
<value>Options not loaded<\/value>
<\/item>
<\/select1>
<\/group>
<group ref=\"Col_1\" faims_style=\"even\">
<label\/>
<select1 ref=\"Select_User\">
<label>\{Select_User\}<\/label>
<item>
<label>Options not loaded<\/label>
<value>Options not loaded<\/value>
<\/item>
<\/select1>
<\/group>
<group ref=\"Col_2\" faims_style=\"even\">
<label\/>
<select1 ref=\"Select_Date\">
<label>\{Select_Date\}<\/label>
<item>
<label>Options not loaded<\/label>
<value>Options not loaded<\/value>
<\/item>
<\/select1>
<\/group>
<\/group>"
perl -0777 -i.original -pe "s/$string/$replacement/igs" ui_schema.xml
string="
<Entity_Types\/>"
replacement="
<Colgroup_1>
<Col_0>
<Entity_Types\/>
<\/Col_0>
<Col_1>
<Select_User\/>
<\/Col_1>
<Col_2>
<Select_Date\/>
<\/Col_2>
<Col_3>
<Select_Location\/>
<\/Col_3>
<\/Colgroup_1>"
perl -0777 -i.original -pe "s/$string/$replacement/igs" ui_schema.xml
string="
<Colgroup_(\\d)>
<Col_1>
<Northing\/>
<\/Col_1>
<Col_2>
<Easting\/>
<\/Col_2>
<Col_3>
<Accuracy\/>
<\/Col_3>
<\/Colgroup_\\1>"
replacement=""
perl -0777 -i.original -pe "s/$string/$replacement/igs" ui_schema.xml
string="
<group ref=\"Colgroup_\\d\" faims_style=\"orientation\">
<label\/>
<group ref=\"Col_1\" faims_style=\"even\">
<label\/>
<input faims_attribute_name=\"Northing\" faims_attribute_type=\"measure\" ref=\"Northing\" faims_read_only=\"true\">
<label>\\{Northing}<\/label>
<\/input>
<\/group>
<group ref=\"Col_2\" faims_style=\"even\">
<label\/>
<input faims_attribute_name=\"Easting\" faims_attribute_type=\"measure\" ref=\"Easting\" faims_read_only=\"true\">
<label>\\{Easting}<\/label>
<\/input>
<\/group>
<group ref=\"Col_3\" faims_style=\"even\">
<label\/>
<input faims_attribute_name=\"Accuracy\" faims_attribute_type=\"measure\" ref=\"Accuracy\" faims_read_only=\"true\">
<label>\\{Accuracy}<\/label>
<\/input>
<\/group>
<\/group>"
replacement=""
perl -0777 -i.original -pe "s/$string/$replacement/igs" ui_schema.xml
string="
<property name=\"Northing\" type=\"measure\">
<description><\/description>
<formatString>\{\{if \\\$1 then \\\$1}}\{\{if and\(\\\$1, \\\$2\) then \" \" }}\{\{if \\\$2 then \\\$2}}\{\{if \\\$3 then \" \(\\\$3\)\"}}\{\{if between\(\\\$4,0,0.49\) then \"\?\?\" elsif lessThan\(\\\$4,1\) then \"\?\" }}<\/formatString>
<appendCharacterString> - <\/appendCharacterString>
<\/property>"
replacement=""
perl -0777 -i.original -pe "s/$string/$replacement/igs" data_schema.xml
string="
<property name=\"Easting\" type=\"measure\">
<description><\/description>
<formatString>\{\{if \\\$1 then \\\$1}}\{\{if and\(\\\$1, \\\$2\) then \" \" }}\{\{if \\\$2 then \\\$2}}\{\{if \\\$3 then \" \(\\\$3\)\"}}\{\{if between\(\\\$4,0,0.49\) then \"\?\?\" elsif lessThan\(\\\$4,1\) then \"\?\" }}<\/formatString>
<appendCharacterString> - <\/appendCharacterString>
<\/property>"
replacement=""
perl -0777 -i.original -pe "s/$string/$replacement/igs" data_schema.xml
cat << EOF >> english.0.properties
Select_User=Select User
Select_Date=Select Date
Select_Location=Select Location
EOF
cat << EOF >> ui_styling.css
.tracklog-start { background-color: green; }
.tracklog-stop { background-color: orange; }
.submit { background-color: green; }
EOF
rm ui_schema.xml.original
rm data_schema.xml.original
cd ../tests
cat << EOF >> mock.bsh
void removeActionBarItem(String name) { return; }
void saveTabGroup(String s, Object o1, Object o2, Object o3, Object o4, boolean b) { return; }
void goBack() { return; }
EOF