From: Erik van der Kouwe Date: Sat, 5 Jun 2010 13:25:41 +0000 (+0000) Subject: Enter package names in packman X-Git-Tag: v3.1.8~500 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/jquery.js?a=commitdiff_plain;h=e7e650885443f23822ae6f231c0f80a97b565293;p=minix.git Enter package names in packman --- diff --git a/commands/packman/packman.sh b/commands/packman/packman.sh index 2d641b6b1..56d4943c6 100644 --- a/commands/packman/packman.sh +++ b/commands/packman/packman.sh @@ -153,7 +153,7 @@ do cd $TMPDIR ) >$TMPF highest="`wc -l $TMPF | awk '{ print $1 - 1 }'`" awk -F'|' <$TMPF '{ printf "%3s %-15s %s\n", $1, $2, $3 }' | $PAGER - echo "Format examples: '3', '3,6', '3-9', '3-9,11-15', 'all'" + echo "Format examples: '3', '3,6', '3-9', '3-9,11-15', 'all', 'gzip-1.2.4'" echo -n "Package(s) to install (RETURN or q to exit)? " packnolist=`myread` if [ "$packnolist" = "" -o "$packnolist" = "q" ] @@ -169,22 +169,35 @@ do cd $TMPDIR for packrange in $packnolist do # Get a-b range. - IFS='-' - set $packrange - start=$1 - if [ $# = 2 ] - then end=$2 - else end=$1 + if [ "$packrange" : '^ *[0-9]' ] + then + # If it starts with a digit, it is a range of package numbers + IFS='-' + set $packrange + start=$1 + if [ $# = 2 ] + then end=$2 + else end=$1 + fi + IFS=' ' + packlist="`awk