diff bin/preExtract.sh @ 52:9cd9daf75183

working towards more robust diff checking
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Mon, 13 Apr 2020 14:12:12 +0100
parents 427056f1784e
children 396d1f17c671
line wrap: on
line diff
--- a/bin/preExtract.sh	Sat Apr 11 13:41:46 2020 +0100
+++ b/bin/preExtract.sh	Mon Apr 13 14:12:12 2020 +0100
@@ -84,18 +84,10 @@
 	  ni=${#ii[@]}
 	  if [ $(wc -l < ${e}_check.txt) -ne $((ni + 1)) ]
 	  then
-              if [[ "$(tr -s "\n\t " " " < ${e}_check.txt)" =~ \
-           ^" "[0-9]*" > 1 < 1 --- 1 "[0-9]*c[0-9]*" 1 "[0-9]*"a"[0-9,]*" "$ ]]
-              then
-               :
-              else
-		echo " " "extra lines in ${e}_check.txt" >> log
-		continue
-              fi
-	  elif [ $(fgrep -c a ${e}_check.txt) -ne $ni ]
-	  then
-	      echo " " "non-addition lines in ${e}_check.txt" >> log
-	      continue
+            if egrep -n '^[1-9]' ${e}_diff.txt | $HOME/bin/nogood.py $e $ni
+            then
+              continue
+            fi
 	  fi
           echo " " starting tar update >> log
 	  egrep "^> " ${e}_diff.txt | cut -f 2 > ${e}_new.txt