From 25a51eb95fc9b0d08140f23ef5b8471ad3cb26f2 Mon Sep 17 00:00:00 2001 From: sjungels Date: Tue, 27 Apr 2010 11:08:50 +0000 Subject: [PATCH] 1. tightened regex install expression; 2. used wget -N where appropriate git-svn-id: https://apt-cyg.googlecode.com/svn/trunk@17 f2a461e8-04e4-11de-bcc6-d9108be23e13 --- apt-cyg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apt-cyg b/apt-cyg index 5263acb..91e5f0b 100644 --- a/apt-cyg +++ b/apt-cyg @@ -94,14 +94,14 @@ function getsetup() then touch setup.ini mv setup.ini setup.ini-save - wget $mirror/setup.bz2 + wget -N $mirror/setup.bz2 if test -e setup.bz2 && test $? -eq 0 then bunzip2 setup.bz2 mv setup setup.ini echo Updated setup.ini else - wget $mirror/setup.ini + wget -N $mirror/setup.ini if test -e setup.ini && test $? -eq 0 then echo Updated setup.ini @@ -328,13 +328,13 @@ case "$command" in # download and unpack the bz2 file # pick the latest version, which comes first - install=`cat "release/$pkg/desc" | awk '/install: / { print $2; exit }'` + install=`cat "release/$pkg/desc" | awk '/^install: / { print $2; exit }'` file=`basename $install` cd "release/$pkg" wget -nc $mirror/$install # check the md5 - digest=`cat "desc" | awk '/install: / { print $4; exit }'` + digest=`cat "desc" | awk '/^install: / { print $4; exit }'` digactual=`md5sum $file | awk '{print $1}'` if ! test $digest = $digactual then