changeset 1335:ffb07a48a960

If sha1sum isn't installed, download falls back through all the mirrors repeatedly downloading stuff, without explaining why it failed.
author Rob Landley <rob@landley.net>
date Fri, 18 Mar 2011 05:58:35 -0500
parents 37c0b0e53b53
children c7dfe0e54a80
files sources/download_functions.sh
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sources/download_functions.sh	Mon Mar 14 19:07:38 2011 -0500
+++ b/sources/download_functions.sh	Fri Mar 18 05:58:35 2011 -0500
@@ -187,6 +187,12 @@
   [ -z "$RENAME" ] || FILENAME="$(echo "$FILENAME" | sed -r "$RENAME")"
   ALTFILENAME=alt-"$(noversion "$FILENAME" -0)"
 
+  if [ -z "$(sha1sum < /dev/null)" ]
+  then
+    echo "Error: please install sha1sum" >&2
+    exit 1
+  fi
+
   echo -ne "checking $FILENAME\r"
 
   # Update timestamps on both stable and unstable tarballs (if any)