...
|
...
|
@@ -168,7 +168,7 @@ function update_database () {
|
168
|
168
|
unset data
|
169
|
169
|
declare -A data
|
170
|
170
|
|
171
|
|
- echo " -> $sx"
|
|
171
|
+ printf " -> $sx"
|
172
|
172
|
getfromrepo ${ac}/$sx-set.xml > $setxml
|
173
|
173
|
|
174
|
174
|
unset xmlgetnext_empty_tag property include include_rootpath ac_save
|
...
|
...
|
@@ -234,7 +234,7 @@ function update_database () {
|
234
|
234
|
done < $setxml
|
235
|
235
|
|
236
|
236
|
if eval "test -z \"$data_test_null\""; then
|
237
|
|
- echo "WARNING: no info found, skipping"
|
|
237
|
+ printf "\nWARNING: no info found, skipping\n"
|
238
|
238
|
mkdir -p $temppath/no-data-ac
|
239
|
239
|
cp -f $setxml $temppath/no-data-ac/${ac}-${sx}
|
240
|
240
|
else
|
...
|
...
|
@@ -256,6 +256,20 @@ function update_database () {
|
256
|
256
|
update_values+="\`$col\` = $single_quote${data[$col]//\'/\'\'}$single_quote, "
|
257
|
257
|
fi
|
258
|
258
|
done
|
|
259
|
+ local flag_new=
|
|
260
|
+ local flag_status=
|
|
261
|
+ if test $(sqlite_request "select count(file) from setxml where file = '$sx' and variantof = $id") -eq 0; then
|
|
262
|
+ flag_new="NEW"
|
|
263
|
+ fi
|
|
264
|
+ for criteria in FDM model systems cockpit; do
|
|
265
|
+ if test ${data[/sim/rating/$criteria]:-0} -ge 4; then
|
|
266
|
+ flag_status+='*'
|
|
267
|
+ fi
|
|
268
|
+ done
|
|
269
|
+ if test -n "$flag_new" -o -n "$flag_status"; then
|
|
270
|
+ printf " (${flag_new:+$flag_new }$flag_status)"
|
|
271
|
+ fi
|
|
272
|
+ printf "\n"
|
259
|
273
|
sqlite_request "insert into setxml (${insert_col%,*}, installed) values (${insert_values%,*}, 0)
|
260
|
274
|
on conflict (file, variantof) where file = '$sx' and variantof = $id do
|
261
|
275
|
update set
|