From 806ea4b35d1a7cbe1e8cadd29a061828ecb97073 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Wed, 27 Sep 2023 07:42:12 +0200 Subject: [PATCH] make_mirror.sh: support FORCE_UPDATE=yes --- make_mirror.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/make_mirror.sh b/make_mirror.sh index 890bdde..0e6570d 100755 --- a/make_mirror.sh +++ b/make_mirror.sh @@ -301,8 +301,9 @@ components=main # by default, use the mmdebstrap executable in the current directory : "${CMD:=./mmdebstrap}" : "${USE_HOST_APT_CONFIG:=no}" +: "${FORCE_UPDATE:=no}" -if [ -e "$oldmirrordir/dists/$DEFAULT_DIST/InRelease" ]; then +if [ "$FORCE_UPDATE" != "yes" ] && [ -e "$oldmirrordir/dists/$DEFAULT_DIST/InRelease" ]; then http_code=$(curl --output /dev/null --silent --location --head --time-cond "$oldmirrordir/dists/$DEFAULT_DIST/InRelease" --write-out '%{http_code}' "$mirror/dists/$DEFAULT_DIST/InRelease") case "$http_code" in 200) ;; # need update