]> Zhao Yanbai Git Server - minix.git/commitdiff
fix off-by-one error in 'all'
authorBen Gras <ben@minix3.org>
Mon, 2 Apr 2007 12:09:43 +0000 (12:09 +0000)
committerBen Gras <ben@minix3.org>
Mon, 2 Apr 2007 12:09:43 +0000 (12:09 +0000)
commands/scripts/packman.sh

index 29eaaa5c1a4b1d75474ccee7a699d65cdaa5cb62..393e6a72578e807434b5d431a9cba9de4ef3fa14 100644 (file)
@@ -118,7 +118,7 @@ do  cd $TMPDIR
                fi
                ) | sort -t'|' +1 | awk '{ n++; printf "%d|%s\n", n, $0 }' 
        ) >$TMPF
-       highest="`wc -l $TMPF | awk '{ print $1 }'`"
+       highest="`wc -l $TMPF | awk '{ print $1 - 1 }'`"
        awk -F'|' <$TMPF '{ printf "%3s %-15s %s\n", $1, $2, $3 }' | more
        echo "Format examples: '3', '3,6', '3-9', '3-9,11-15', 'all'"
        echo -n "Package(s) to install (RETURN to exit) ?  "