aboutsummaryrefslogtreecommitdiff
path: root/debian-dl
diff options
context:
space:
mode:
Diffstat (limited to 'debian-dl')
-rwxr-xr-xdebian-dl15
1 files changed, 13 insertions, 2 deletions
diff --git a/debian-dl b/debian-dl
index 2566b4f..ea25be2 100755
--- a/debian-dl
+++ b/debian-dl
@@ -11,6 +11,7 @@ BASENAME="`basename $0`"
URL="$1"
BASE="`dirname $URL`"
RATE="$2"
+FILENAME="`basename $URL`"
# Syntax
if [ -z "$1" ]; then
@@ -32,5 +33,15 @@ fi
# Get the image
wget -c $LIMIT $URL
-# Teardown
-echo "Please check `basename $URL` integrity!"
+# Check hashes
+for hash in $HASHES; do
+ echo "Checking $FILENAME against $hash file..."
+ check="`echo $hash | tr '[:upper:]' '[:lower:]' | sed -e 's/s$//'`sum"
+ grep -e "$FILENAME$" $hash | $check -c
+done
+
+# Check hash integrity
+for hash in $HASHES; do
+ echo "Checking $hash.sig..."
+ gpg --verify $hash.sig
+done