]> Zhao Yanbai Git Server - minix.git/commitdiff
Make urlget for package list interruptable with ^C
authorBen Gras <ben@minix3.org>
Sun, 26 Mar 2006 19:56:05 +0000 (19:56 +0000)
committerBen Gras <ben@minix3.org>
Sun, 26 Mar 2006 19:56:05 +0000 (19:56 +0000)
commands/scripts/packman.sh

index 3d73f2d818e66c6253567dc6b7295a544fee20d1..282ebe5f2ddc67c807f87d33c64ca94552dc60d5 100644 (file)
@@ -119,8 +119,10 @@ then       if [ -f $LISTFILE ]
                y=y
        fi
        if [ "$y" = y -o "$y" = Y ]
-       then    echo "Fetching package list."
-               urlget $LISTURL >$TMPF && mv $TMPF $LISTFILE || echo "Update not successful."
+       then    echo "Fetching package list (^C to interrupt)."
+               trap '' 2
+               intr urlget $LISTURL >$TMPF && mv $TMPF $LISTFILE || echo "Update not successful."
+               trap 2
        fi
        netpackages=$LISTFILE
        if [ ! -f "$netpackages" -o ! `cat "$netpackages" 2>/dev/null | wc -l | awk '{ print $1 }'` -gt 1 ]