From 819134b860fb92e3af2b8ed4662fe27554a88db2 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sat, 14 Sep 2019 00:40:36 -0700 Subject: [PATCH] sleep waiting for the lock dir, and make sure the indexes are publicly readable.. --- addinfo.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addinfo.sh b/addinfo.sh index 4ef107b..4c4b0bc 100644 --- a/addinfo.sh +++ b/addinfo.sh @@ -77,7 +77,9 @@ elif [ x"$complete" != x"1" -a $# -ne 1 ]; then usage 2 fi -mkdir "$0.running" +while ! mkdir "$0.running"; do + sleep 1; +done if [ x"$complete" = x"1" ]; then sort -u snapshot.complete.idx | xz > snapshot.complete.idx.xz @@ -147,6 +149,7 @@ if [ x"$more" = x"1" ]; then mv snapshot.idx.new snapshot.idx mv snapshot.complete.idx.new snapshot.complete.idx else + chmod 644 snapshot.idx.new.xz snapshot.complete.idx.new.xz mv snapshot.idx.new.xz snapshot.idx.xz mv snapshot.complete.idx.new.xz snapshot.complete.idx.xz fi