test file size

This commit is contained in:
vv01f 2019-08-11 13:01:49 +02:00
parent 945291a2a8
commit 140f74c408
Signed by untrusted user who does not match committer: vv01f
GPG Key ID: 02625A16AC1D1FF6
1 changed files with 3 additions and 0 deletions

3
get.sh
View File

@ -17,8 +17,11 @@ fn_SHA256=${fn1}"_"${ver}"_SHA256SUMS"
curl -L $url$fn_package -o $fn_package || { echo "download failed"; exit 1; }
curl -L $url$fn_SHA256 -o $fn_SHA256 || { echo "download failed"; exit 1; }
# test checksums
$(cat ${fn_SHA256} |grep $$(sha256sum $fn_package)) && {
# test filesize, didnt see any near 10 MB
test $(du $fn_SHA256) -lt 10240 || { echo "manually check exceptionally large file before installation."; exit 1; }
# maybe install
case $(echo $fn_suffix|cut -d"-" -f1) in
linux)