comparison SCRIPTS/process.sh @ 47:fe753ff3d0b5

Simpler solution to .cat test
author Chris Cannam
date Thu, 07 Aug 2014 15:05:37 +0100
parents d572322e2efe
children 666a1c41ce51
comparison
equal deleted inserted replaced
46:d572322e2efe 47:fe753ff3d0b5
395 fi 395 fi
396 done 396 done
397 if [ "$good" = "yes" ]; then 397 if [ "$good" = "yes" ]; then
398 excess=$(plugin_ids_in "$dir" | sed 's/^/vamp:/' | \ 398 excess=$(plugin_ids_in "$dir" | sed 's/^/vamp:/' | \
399 cat "$dir"/*".cat" - | \ 399 cat "$dir"/*".cat" - | \
400 sort | \ 400 sed 's/::.*//' | \
401 perl -e 'while (<>) { 401 sort | \
402 if (/::/) { 402 uniq -u)
403 print if (!defined $plugid or !/^$plugid/);
404 } else {
405 chomp; $plugid = $_;
406 }
407 }')
408 if [ -n "$excess" ]; then 403 if [ -n "$excess" ]; then
409 echo "ERROR: excess definitions in .cat file? $excess" | tee -a "$log" 404 echo "ERROR: excess or missing definitions in .cat file? $excess" | tee -a "$log"
410 good=no 405 good=no
411 else 406 else
412 echo "GOOD: no excess definitions in .cat files" | tee -a "$log" 407 echo "GOOD: no excess or missing definitions in .cat files" | tee -a "$log"
413 fi 408 fi
414 fi 409 fi
415 [ "$good" = "yes" ] 410 [ "$good" = "yes" ]
416 } 411 }
417 412