|
@@ -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)) |
|
|