From 349497fc057d8baa57dbd179c700b1383c5c7a58 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 13 Dec 2021 18:53:43 +0100 Subject: Updating. Signed-off-by: Daniel Baumann --- web/update | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/web/update b/web/update index ca9233f..06fa927 100755 --- a/web/update +++ b/web/update @@ -84,17 +84,17 @@ ARCHITECTURES="amd64 armel armhf arm64 i386 all source" Download_downstream_indices () { # Download downstream indices -# if [ -e "downstream.${MODE}.indices" ] && [ "$(( $(stat -c %Y downstream.${MODE}.indices) + ( 4 * 3600 ) ))" -lt "$(date +%s)" ] +# if [ -e "downstream.${MODE}.sources" ] && [ "$(( $(stat -c %Y downstream.${MODE}.sources) + ( 4 * 3600 ) ))" -lt "$(date +%s)" ] # then # # file is older than 4 hours - rm -f "downstream.${MODE}.indices" + rm -f "downstream.${MODE}.sources" # fi - if [ ! -e "downstream.${MODE}.indices" ] + if [ ! -e "downstream.${MODE}.sources" ] then for SECTION in ${DOWNSTREAM_SECTIONS} do - wget -q -O - "${DOWNSTREAM_MIRROR}/dists/${DOWNSTREAM_DISTRIBUTION}/${SECTION}/source/Sources.xz" | xz -d >> "downstream.${MODE}.indices" + wget -q -O - "${DOWNSTREAM_MIRROR}/dists/${DOWNSTREAM_DISTRIBUTION}/${SECTION}/source/Sources.xz" | xz -d >> "downstream.${MODE}.sources" done fi } @@ -102,14 +102,20 @@ Download_downstream_indices () Download_upstream_indices () { # Download upstream indices -# if [ -e "upstream.${MODE}.indices" ] && [ "$(( $(stat -c %Y upstream.${MODE}.indices) + ( 4 * 3600 ) ))" -lt "$(date +%s)" ] +# if [ -e "upstream.${MODE}.sources" ] && [ "$(( $(stat -c %Y upstream.${MODE}.sources) + ( 4 * 3600 ) ))" -lt "$(date +%s)" ] # then # # file is older than 4 hours - rm -f "upstream.${MODE}.indices" + rm -f "upstream.${MODE}.sources" # fi - if [ ! -e "upstream.${MODE}.indices" ] - then +# if [ -e "upstream.${MODE}.binaries" ] && [ "$(( $(stat -c %Y upstream.${MODE}.binaries) + ( 4 * 3600 ) ))" -lt "$(date +%s)" ] +# then +# # file is older than 4 hours + rm -f "upstream.${MODE}.binaries" +# fi + +# if [ ! -e "upstream.${MODE}.indices" ] +# then echo -n "Downloading indices... " for DISTRIBUTION in ${UPSTREAM_DISTRIBUTIONS} @@ -129,11 +135,11 @@ Download_upstream_indices () case "${ARCHITECTURE}" in source) - wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}/updates/${SECTION}/${ARCHITECTURE}/Sources.xz" | xz -d >> "upstream.${MODE}.indices" + wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}/updates/${SECTION}/${ARCHITECTURE}/Sources.xz" | xz -d >> "upstream.${MODE}.sources" ;; *) - wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}/updates/${SECTION}/binary-${ARCHITECTURE}/Packages.xz" | xz -d >> "upstream.${MODE}.indices" + wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}/updates/${SECTION}/binary-${ARCHITECTURE}/Packages.xz" | xz -d >> "upstream.${MODE}.binaries" ;; esac done @@ -150,11 +156,11 @@ Download_upstream_indices () case "${ARCHITECTURE}" in source) - wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}-security/${SECTION}/${ARCHITECTURE}/Sources.xz" | xz -d >> "upstream.${MODE}.indices" + wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}-security/${SECTION}/${ARCHITECTURE}/Sources.xz" | xz -d >> "upstream.${MODE}.sources" ;; *) - wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}-security/${SECTION}/binary-${ARCHITECTURE}/Packages.xz" | xz -d >> "upstream.${MODE}.indices" + wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}-security/${SECTION}/binary-${ARCHITECTURE}/Packages.xz" | xz -d >> "upstream.${MODE}.binaries" ;; esac done @@ -171,11 +177,11 @@ Download_upstream_indices () case "${ARCHITECTURE}" in source) - wget -q -O - "${UPSTREAM_MIRROR}/dists/${DISTRIBUTION}/${SECTION}/${ARCHITECTURE}/Sources.xz" | xz -d >> "upstream.${MODE}.indices" + wget -q -O - "${UPSTREAM_MIRROR}/dists/${DISTRIBUTION}/${SECTION}/${ARCHITECTURE}/Sources.xz" | xz -d >> "upstream.${MODE}.sources" ;; *) - wget -q -O - "${UPSTREAM_MIRROR}/dists/${DISTRIBUTION}/${SECTION}/binary-${ARCHITECTURE}/Packages.xz" | xz -d >> "upstream.${MODE}.indices" + wget -q -O - "${UPSTREAM_MIRROR}/dists/${DISTRIBUTION}/${SECTION}/binary-${ARCHITECTURE}/Packages.xz" | xz -d >> "upstream.${MODE}.binaries" ;; esac done @@ -183,7 +189,7 @@ Download_upstream_indices () done echo " done." - fi +# fi } Download_downstream_indices -- cgit v1.2.3