From c56769e11f1f532e35551266c4fc926b0dbd3015 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sun, 4 Nov 2018 10:26:54 -0800 Subject: [PATCH] skip some of the malformed lines for now... --- README.md | 4 ++++ mksnapidx.awk | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 68c47f0..f1d0685 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,7 @@ file. The only file needed for this is the snapaid.sh script. The other files are used for generating the index. + +NOTE: Not all of the snapshots are in the database. Some snapshot names, +like 11.0-RC1, don't contain all the info others do, and are not +included. In the future, hopefully this will be fixed. diff --git a/mksnapidx.awk b/mksnapidx.awk index a88fb5a..a744954 100644 --- a/mksnapidx.awk +++ b/mksnapidx.awk @@ -86,5 +86,14 @@ $1 == "SHA512" { } else url = root parts[2] "/" fname + # if this part doesn't begin w/ r (for svn rev), skip it, we can't parse + # others for now + if (substr(parts[nextidx], 1, 1) != "r") + next + + # double check that date is valid, if not, skip it + if (!isdate(date)) + next + printf("%s %s %s %s %s %s %s %s %s %s\n", type, parts[2] "-" parts[3], arch, platform, date, parts[nextidx], vers, fname, url, MID) }