changeset 47:fe753ff3d0b5

Simpler solution to .cat test
author Chris Cannam
date Thu, 07 Aug 2014 15:05:37 +0100
parents d572322e2efe
children 8d8d532400b8
files SCRIPTS/process.sh
diffstat 1 files changed, 5 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/SCRIPTS/process.sh	Thu Aug 07 14:39:38 2014 +0100
+++ b/SCRIPTS/process.sh	Thu Aug 07 15:05:37 2014 +0100
@@ -397,19 +397,14 @@
     if [ "$good" = "yes" ]; then
 	excess=$(plugin_ids_in "$dir" | sed 's/^/vamp:/' | \
 	    cat "$dir"/*".cat" - | \
-	    sort | \
-	    perl -e 'while (<>) { 
-                         if (/::/) {
-                             print if (!defined $plugid or !/^$plugid/);
-                         } else {
-                             chomp; $plugid = $_; 
-                         }
-                     }')
+	    sed 's/::.*//' | \
+            sort | \
+            uniq -u)
 	if [ -n "$excess" ]; then
-	    echo "ERROR: excess definitions in .cat file? $excess" | tee -a "$log"
+	    echo "ERROR: excess or missing definitions in .cat file? $excess" | tee -a "$log"
 	    good=no
 	else
-	    echo "GOOD: no excess definitions in .cat files" | tee -a "$log"
+	    echo "GOOD: no excess or missing definitions in .cat files" | tee -a "$log"
 	fi
     fi
     [ "$good" = "yes" ]