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

View file

@ -10,3 +10,4 @@ RUN \
ADD run_stage.sh /usr/bin/run_stage
ADD git-mini-clone.sh /usr/bin/git-mini-clone
ADD check-wget.sh /usr/bin/check-wget

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}"