From 1279c813d8c31b6690d67e94e90de2ae9570ff4b Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Tue, 5 Oct 2021 19:23:49 -0500 Subject: scripts/healthchecks: store package source and resources in named/versioned directories --- scripts/healthchecks | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'scripts/healthchecks') diff --git a/scripts/healthchecks b/scripts/healthchecks index 99e96a638..f50a9a3dd 100755 --- a/scripts/healthchecks +++ b/scripts/healthchecks @@ -53,9 +53,7 @@ try_down () printf " - %s (%s)\n" "${down}" "${name}"; okay=0; - test -f "${SAVE}/${name}" && return; - - touch "${TEMP}/fail.list"; + test -f "${name}" && return; ## # Download the file and set global 'okay' to curl retval. @@ -77,7 +75,7 @@ try_down () ## # Successful download; move the file to the cache directory. # - mv "${TEMP}/${name}" "${SAVE}/${name}"; + mv "${TEMP}/${name}" "${name}"; } @@ -116,8 +114,6 @@ gen_sums () | grep "${name}" >> "${SAVE}/SHA512SUMS" \ ; - cd "${SAVE}"; - sha512sum >> "${SAVE}/SHA512SUMS" "${name}"; } @@ -125,9 +121,11 @@ gen_sums () #--------------------------------------------------------------- # main loop -printf "We will now begin processing matching packages:\n"; - mkdir -p "${SAVE}"; +touch "${TEMP}/fail.list"; +touch "${SAVE}/SHA512SUMS"; + +printf "We will now begin processing matching packages:\n"; find "${HERE}/.." -type f -name APKBUILD | sort | while read k; do @@ -164,6 +162,8 @@ find "${HERE}/.." -type f -name APKBUILD | sort | while read k; do # # We only care about cases 1 and 2; case 3 is ignored. # + mkdir -p "${SAVE}/${pkgname}-${pkgver}"; + cd "${SAVE}/${pkgname}-${pkgver}"; for f in ${source}; do ## -- cgit v1.2.3-60-g2f50