diff update.sh @ 160:a84b40bc2a99

Add parselist.pl utility and use it in update script.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 17 Aug 2015 22:02:22 +0300
parents e97705171c3c
children b4a07ea2d739
line wrap: on
line diff
--- a/update.sh	Mon Feb 09 16:33:27 2015 +0200
+++ b/update.sh	Mon Aug 17 22:02:22 2015 +0300
@@ -15,7 +15,7 @@
   PATPREFIX="$3"
 
   if wget -q -O "$LISTFILE" "$URLPREFIX"; then
-    perl -ne "if (/<a href=\"${PATPREFIX}([A-Z]{3}\d\S+)${URLSUFFIX}\">/) { print \"\$1\n\"; }" < "$LISTFILE" > "$CLASSFILE"
+    perl -w ./parselist.pl "$PATPREFIX" "$URLSUFFIX" < "$LISTFILE" > "$CLASSFILE"
     rm -f "$LISTFILE"
     echo -n "* Fetched classfile $CLASSFILE: "
     cat "$CLASSFILE" | wc -l