From f9a6cc2e737545d0ff350e6a5c5a8b55574e7c3a Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 29 Dec 2018 13:07:53 +0100 Subject: [PATCH] Directly pipe checksum into comparison tool in download function Don't create unneccessary temporary files. Signed-off-by: David Oberhollenzer --- util/download.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/util/download.sh b/util/download.sh index 3537f93..96b8351 100755 --- a/util/download.sh +++ b/util/download.sh @@ -10,11 +10,7 @@ fetch_package() { -L "$URL/$TARBALL" fi - pushd "$PKGDOWNLOADDIR" > /dev/null - echo "$SHA256SUM ${TARBALL}" > "${TARBALL}.sha256" - sha256sum -c --quiet "${TARBALL}.sha256" - rm "${TARBALL}.sha256" - popd > /dev/null + echo "$SHA256SUM $PKGDOWNLOADDIR/${TARBALL}" | sha256sum -c --quiet "-" if [ ! -e "$PKGSRCDIR/$SRCDIR" ]; then local LOGFILE="$PKGLOGDIR/${PKGNAME}-prepare.log"