This commit is contained in:
Steven Penny 2015-04-16 11:20:25 -05:00
parent 210e5a3cde
commit 56f3961371
1 changed files with 6 additions and 2 deletions

View File

@ -318,12 +318,16 @@ function download {
# check the md5
digest=$4
case ${#digest} in
32) hash=md5sum ;;
128) hash=sha512sum ;;
esac
mkdir -p $cache/$mirrordir/$dn
cd $cache/$mirrordir/$dn
if ! test -e $bn || ! md5sum -c <<< "$digest $bn"
if ! test -e $bn || ! $hash -c <<< "$digest $bn"
then
wget -O $bn $mirror/$dn/$bn
md5sum -c <<< "$digest $bn" || exit
$hash -c <<< "$digest $bn" || exit
fi
tar tf $bn | gzip > /etc/setup/"$pkg".lst.gz