Browse Source

add script that I used to fix up some bugs..

main
John-Mark Gurney 2 years ago
parent
commit
b372ff1f59
Signed by: jmg GPG Key ID: 205F0B33DD006ADA
1 changed files with 30 additions and 0 deletions
  1. +30
    -0
      fixbci.sh

+ 30
- 0
fixbci.sh View File

@@ -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
}
'

Loading…
Cancel
Save