Browse Source

document and work around issue w/ files disappearing from mirrors..

The local mirror had all the files disappear last September causing
lots of releases to be missing, and subsequently deleted from the
available list for fetching...
main
John-Mark Gurney 2 years ago
parent
commit
af2dada6ee
Signed by: jmg GPG Key ID: 205F0B33DD006ADA
1 changed files with 18 additions and 0 deletions
  1. +18
    -0
      addinfo.sh

+ 18
- 0
addinfo.sh View File

@@ -29,6 +29,12 @@


set -e set -e


#
# Note: It appears that sometimes files can "disappear" from the server, so,
# uncompress snapshot.complete.idx.xz to both snapshot.complete.idx and
# snapshot.idx, and then run "sh addinfo.sh -c YYYYMMDD" with the oldest
# known snapshot.

usage() { usage() {
echo "Usage: $0 [ -m ] <file>" echo "Usage: $0 [ -m ] <file>"
echo "Usage: $0 -c <date>" echo "Usage: $0 -c <date>"
@@ -82,6 +88,18 @@ while ! mkdir "$0.running"; do
done done


if [ x"$complete" = x"1" ]; then if [ x"$complete" = x"1" ]; then
if [ ! -f snapshot.complete.idx ]; then
echo 'snapshot.complete.idx does not exist, aborting...'
rmdir "$0.running"
exit 5
fi

if [ ! -f snapshot.idx ]; then
echo 'snapshot.idx does not exist, aborting...'
rmdir "$0.running"
exit 5
fi

sort -u snapshot.complete.idx | xz > snapshot.complete.idx.xz sort -u snapshot.complete.idx | xz > snapshot.complete.idx.xz
awk '$5 == "xxx" || $5 >= "'"$1"'" { awk '$5 == "xxx" || $5 >= "'"$1"'" {
if (!system("wget --method=HEAD " $9)) if (!system("wget --method=HEAD " $9))


Loading…
Cancel
Save