diff options
author | Joey Hess <joey@kitenet.net> | 2011-05-20 13:22:01 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-05-20 13:22:01 -0400 |
commit | 360f4422c54cb76c5132f071bdcf0284d5f68b54 (patch) | |
tree | 574265d04086e4a0da701843c406c9a24b3329b5 | |
parent | a2055ea149ab00acc864c45db909463a40404a8f (diff) | |
download | debootstrap-360f4422c54cb76c5132f071bdcf0284d5f68b54.tar.gz |
also look for md5sum in release file if using md5sums
-rw-r--r-- | functions | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -452,7 +452,12 @@ apt_dest () { get_release_checksum () { local reldest="$1" local path="$2" - sed -n "/^[Ss][Hh][Aa]$SHA_SIZE:/,/^[^ ]/p" < "$reldest" | \ + if [ "$DEBOOTSTRAP_CHECKSUM_FIELD" = MD5SUM ]; then + local match="^[Mm][Dd]5[Ss][Uu][Mm]" + else + local match="^[Ss][Hh][Aa]$SHA_SIZE:" + fi + sed -n "/$match/,/^[^ ]/p" < "$reldest" | \ while read a b c; do if [ "$c" = "$path" ]; then echo "$a $b"; fi done | head -n 1 |