Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ee3f7b8

Browse files
author
sjungels
committed
added edge case for obsolete packages
git-svn-id: https://apt-cyg.googlecode.com/svn/trunk@18 f2a461e8-04e4-11de-bcc6-d9108be23e13
1 parent 25a51eb commit ee3f7b8

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

apt-cyg

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
#!/bin/bash
23

34
# apt-cyg: install tool for cygwin similar to debian apt-get
@@ -323,12 +324,18 @@ case "$command" in
323324
exit 1
324325
fi
325326
echo Found package $pkg
326-
327-
327+
328328
# download and unpack the bz2 file
329-
329+
330330
# pick the latest version, which comes first
331331
install=`cat "release/$pkg/desc" | awk '/^install: / { print $2; exit }'`
332+
333+
if test "-$install-" = "--"
334+
then
335+
echo "Could not find \"install\" in package description: obsolete package?"
336+
exit 1
337+
fi
338+
332339
file=`basename $install`
333340
cd "release/$pkg"
334341
wget -nc $mirror/$install

0 commit comments

Comments
 (0)