added edge case for obsolete packages

git-svn-id: https://apt-cyg.googlecode.com/svn/trunk@18 f2a461e8-04e4-11de-bcc6-d9108be23e13
This commit is contained in:
sjungels 2010-04-27 18:55:43 +00:00
parent 25a51eb95f
commit ee3f7b84df
1 changed files with 10 additions and 3 deletions

13
apt-cyg
View File

@ -1,3 +1,4 @@
#!/bin/bash #!/bin/bash
# apt-cyg: install tool for cygwin similar to debian apt-get # apt-cyg: install tool for cygwin similar to debian apt-get
@ -323,12 +324,18 @@ case "$command" in
exit 1 exit 1
fi fi
echo Found package $pkg echo Found package $pkg
# download and unpack the bz2 file # download and unpack the bz2 file
# pick the latest version, which comes first # 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 }'`
if test "-$install-" = "--"
then
echo "Could not find \"install\" in package description: obsolete package?"
exit 1
fi
file=`basename $install` file=`basename $install`
cd "release/$pkg" cd "release/$pkg"
wget -nc $mirror/$install wget -nc $mirror/$install