separation AI/real models, and checks sqlite and db...
...presence
... | ... |
@@ -229,10 +229,11 @@ function fgfs () { |
229 | 229 |
echo |
230 | 230 |
for model in $(awk '/@/{a[$NF]++}END{for (i in a) print i}' $mplist); do |
231 | 231 |
if test -r $FGADDON/$model \ |
232 |
- -o -r $FGDIR/source/fgdata/$model \ |
|
233 |
- -o -r $FGDIR/source/fgdata/AI/$model; then |
|
232 |
+ -o -r $FGDIR/source/fgdata/$model; then |
|
234 | 233 |
installed_model[${${(s:/:)model}[2]}]=1 |
235 |
- else |
|
234 |
+ elif test -r $FGDIR/source/fgdata/AI/$model; then |
|
235 |
+ installed_model[*${${(s:/:)model}[2]}]=1 |
|
236 |
+ elif test -n "$(command -v sqlite3)" -a -r $FGADDON/fgaddon.db; then |
|
236 | 237 |
ac_name=$(sqlite3 $FGADDON/fgaddon.db <<< 'select printf("%s/%s", aircrafts.name, setxml.file) |
237 | 238 |
from aircrafts |
238 | 239 |
inner join setxml |
... | ... |
@@ -244,11 +245,13 @@ function fgfs () { |
244 | 245 |
else |
245 | 246 |
unknown_model[${model}]=1 |
246 | 247 |
fi |
248 |
+ else |
|
249 |
+ unknown_model[${model}]=1 |
|
247 | 250 |
fi |
248 | 251 |
done |
249 | 252 |
if test ${#installed_model[@]} -gt 0; then |
250 | 253 |
echo "${(j:\n:)${(Ok)installed_model[@]}}" > $mplist |
251 |
- echo -e "Installed:\n$(column -c$(tput cols) $mplist)\n" |
|
254 |
+ echo -e "Installed (*AI model only):\n$(column -c$(tput cols) $mplist)\n" |
|
252 | 255 |
fi |
253 | 256 |
if test ${#fgaddon_model[@]} -gt 0; then |
254 | 257 |
echo "${(j:\n:)${(Ok)fgaddon_model[@]}}" > $mplist |