Add check-wget

This commit is contained in:
BtbN 2020-10-30 14:23:30 +01:00
parent 2ddab26445
commit 83d330ffbf
2 changed files with 11 additions and 0 deletions

10
images/base/check-wget.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
set -xe
FNAME="$1"
URL="$2"
SHA512="$3"
SHAFILE="${FNAME}.sha512"
wget -O "${FNAME}" "${URL}"
trap "rm -f ${SHAFILE}" EXIT
echo "${SHA512} ${FNAME}" > "${SHAFILE}"
sha512sum -c "${SHAFILE}"