diff --git a/tools/grab_md5 b/tools/grab_md5 index ee0ef094..af18ae86 100755 --- a/tools/grab_md5 +++ b/tools/grab_md5 @@ -8,6 +8,8 @@ # Parse Packages and Sources files out of a mirror and pre-process # them into a single list ready for mkisofs to check later +set -e + MIRROR=$1 ARCHES="$2" CODENAME=$3 @@ -19,6 +21,13 @@ do LOCATIONS="$MIRROR/dists/$CODENAME/ $MIRROR/dists/$DI_CODENAME/" echo "Looking in $LOCATIONS" + for LOCATION in $LOCATIONS; do + if [ ! -d $LOCATION ]; then + echo "Error: $LOCATION is not a directory" + exit 1 + fi + done + case $ARCH in source) FILES=`find $LOCATIONS -name Sources.gz`