... | ... |
@@ -49,7 +49,7 @@ function sqlite_request () { |
49 | 49 |
function xmlremovecomments () { |
50 | 50 |
sed -ri 's/<(!--|script>)/\n&/;s/(<\/script|--)>/&\n/' $setxml |
51 | 51 |
sed -ri '/<(script>|!--).*(<\/script|--)>/d;/<(script>|!--)/,/(<\/script|--)>/d' $setxml |
52 |
- sed -i 's/\xef\xbb\xbf//' $setxml |
|
52 |
+ sed -i 's/\xef\xbb\xbf//' $setxml # removes BOM |
|
53 | 53 |
} |
54 | 54 |
|
55 | 55 |
function trap_break () { |
... | ... |
@@ -114,7 +114,6 @@ function trap_exit () { |
114 | 114 |
} |
115 | 115 |
|
116 | 116 |
function register_state () { |
117 |
-set +x |
|
118 | 117 |
sqlite_request "drop table if exists recover_rev" |
119 | 118 |
sqlite_request "create table recover_rev ( |
120 | 119 |
revkey text, |
... | ... |
@@ -139,7 +138,6 @@ set +x |
139 | 138 |
'$sx' |
140 | 139 |
)" |
141 | 140 |
done |
142 |
- set +x |
|
143 | 141 |
exit |
144 | 142 |
} |
145 | 143 |
|
... | ... |
@@ -219,12 +217,12 @@ function update_database () { |
219 | 217 |
data[${property/\/PropertyList}]=$(tr '\n' ' ' <<< ${data[${property/\/PropertyList}]} | sed -r 's/^\s*//;s/\s+/ /g;s/\s*$//') |
220 | 218 |
fi |
221 | 219 |
|
222 |
- if test -n "$_TAG"; then |
|
223 |
- # _TAG non-null means xml props ends with / |
|
224 |
- # need to go back of last property |
|
225 |
- property=${property/%\/${_TAG%% *}} |
|
226 |
- unset _TAG |
|
227 |
- fi |
|
220 |
+# if test -n "$_TAG"; then |
|
221 |
+# # _TAG non-null means xml props ends with / |
|
222 |
+# # need to go back of last property |
|
223 |
+# property=${property/%\/${_TAG%% *}} |
|
224 |
+# unset _TAG |
|
225 |
+# fi |
|
228 | 226 |
|
229 | 227 |
# continue parsing (while loop) until everything's found |
230 | 228 |
for col in ${!data[@]}; do |