...
|
...
|
@@ -284,7 +284,7 @@ trap trap_exit EXIT
|
284
|
284
|
|
285
|
285
|
stty -echoctl
|
286
|
286
|
|
287
|
|
-declare -A revindex revauthor revdate setxmlmodified files revpath
|
|
287
|
+declare -A revindex revauthor revdate setxmlmodified revpath
|
288
|
288
|
data_pattern=$(printf "%s|" ${!data[@]})
|
289
|
289
|
data_pattern=${data_pattern:0:-1}
|
290
|
290
|
data_test_null=$(printf '${data[%s]}' ${!data[@]})
|
...
|
...
|
@@ -392,11 +392,11 @@ while xmlgetnext; do
|
392
|
392
|
if test $kind = 'file' -a ${#path[@]} -gt 3; then
|
393
|
393
|
revpath[$action]+="$VALUE "
|
394
|
394
|
elif test $kind = 'dir' -a ${#path[@]} -eq 3 -a $action = 'D'; then
|
395
|
|
- files[_${path[2]}]=0
|
396
|
395
|
unset revindex[_${path[2]}] revauthor[_${path[2]}] revdate[_${path[2]}]
|
397
|
396
|
for sx in ${!setxmlmodified[@]}; do
|
398
|
397
|
[[ "$sx" =~ "${path[2]}/" ]] && unset setxmlmodified[$sx]
|
399
|
398
|
done
|
|
399
|
+ sqlite_request "delete from aircrafts where name = '${path[2]}'"
|
400
|
400
|
fi
|
401
|
401
|
;;
|
402
|
402
|
'/logentry')
|
...
|
...
|
@@ -406,20 +406,15 @@ while xmlgetnext; do
|
406
|
406
|
unset setxmlmodified[${path[2]}/${path[3]/-set.xml}]
|
407
|
407
|
sqlite_request "delete from setxml where file = '${path[3]/-set.xml}'"
|
408
|
408
|
fi
|
409
|
|
- files[_${path[2]}]=$(( --files[_${path[2]}] ))
|
410
|
|
- if test ${files[_${path[2]}]} -le 0; then
|
411
|
|
- unset revindex[_${path[2]}] revauthor[_${path[2]}] revdate[_${path[2]}]
|
412
|
|
- sqlite_request "delete from aircrafts where name = '${path[2]}'"
|
413
|
|
- fi
|
414
|
409
|
done
|
415
|
410
|
for action in A M R; do
|
416
|
411
|
for item in ${revpath[$action]}; do
|
417
|
412
|
path=(${item//\// })
|
|
413
|
+ test -z "${path[2]}" && continue # avoid empty
|
418
|
414
|
revindex[_${path[2]}]=$revision
|
419
|
415
|
revauthor[_${path[2]}]=$revauthor
|
420
|
416
|
revdate[_${path[2]}]=$revdate
|
421
|
417
|
[[ "${path[3]}" =~ "-set.xml" ]] && setxmlmodified[${path[2]}/${path[3]/-set.xml}]=1
|
422
|
|
- test $action = 'A' && files[_${path[2]}]=$(( ++files[_${path[2]}] ))
|
423
|
418
|
done
|
424
|
419
|
done
|
425
|
420
|
newprogress=$((++logentry * 100 / $total))
|