diff --git a/fixbci.sh b/fixbci.sh new file mode 100644 index 0000000..6fdee0e --- /dev/null +++ b/fixbci.sh @@ -0,0 +1,30 @@ +# This script can be used to fix up errors in the main database. +# +# This fixes up an error where the CI URL prefex wasn't properly +# added. + +( + awk '{ print $9 }' snapshot.complete.idx | grep -v ^https; + echo 2; + cat snapshot.complete.idx) | + awk ' +BEGIN { + state = 0 +} + +state == 0 && $0 == "2" { + state = 1 + next +} + +state == 0 { + fix[$1] = 1 +} + +state == 1 { + if ($9 in fix) + $9 = "https://download.freebsd.org/ftp/snapshots/CI-IMAGES/" $9 + + print +} +'