This commit is contained in:
Steven Penny 2014-12-26 04:41:18 -06:00
parent b1162d9d95
commit dcd9b3d56d
1 changed files with 5 additions and 7 deletions

12
apt-cyg
View File

@ -320,12 +320,10 @@ function download {
digest=$4 digest=$4
mkdir -p $cache/$mirrordir/$dn mkdir -p $cache/$mirrordir/$dn
cd $cache/$mirrordir/$dn cd $cache/$mirrordir/$dn
wget -nc $mirror/$dn/$bn if ! test -e $bn || ! md5sum -c <<< "$digest $bn"
digactual=$(md5sum $bn | awk NF=1)
if [ $digest != $digactual ]
then then
echo MD5 sum did not match, exiting wget -O $bn $mirror/$dn/$bn
exit 1 md5sum -c <<< "$digest $bn" || exit
fi fi
tar tf $bn | gzip > /etc/setup/"$pkg".lst.gz tar tf $bn | gzip > /etc/setup/"$pkg".lst.gz
@ -378,7 +376,7 @@ function apt-searchall {
function apt-install { function apt-install {
check-packages check-packages
find-workspace find-workspace
local pkg dn bn requires wr package script local pkg dn bn requires wr package sbq script
for pkg in "${pks[@]}" for pkg in "${pks[@]}"
do do
@ -387,7 +385,7 @@ function apt-install {
echo Package $pkg is already installed, skipping echo Package $pkg is already installed, skipping
continue continue
fi fi
echo (( sbq++ )) && echo
echo Installing $pkg echo Installing $pkg
download $pkg download $pkg