sed out the filename from sha1sum output

This commit is contained in:
Joey Hess 2015-10-06 16:53:24 -04:00
parent c83472145c
commit dd38d01a11

View file

@ -65,11 +65,11 @@ fi
getextra () {
extrap="$1"
extrasha="$2"
curextrasha="$(withcyg sha1sum $extrap)"
curextrasha="$(withcyg sha1sum $extrap | sed 's/ .*//')"
if [ ! -e "$extrap" ] || [ "$curextrasha" != "$extrasha" ]; then
rm -f "$extrap" || true
withcyg wget https://downloads.kitenet.net/git-annex/windows/assets/$extrap
curextrasha="$(withcyg sha1sum $extrap)"
curextrasha="$(withcyg sha1sum $extrap | sed 's/ .*//')"
if [ "$curextrasha" != "$extrasha" ]; then
rm -f "$extrap"
echo "CHECKSUM FAILURE" >&2