pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/scripts Fix up the comments, and add a fall-through...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e8a6c6456ee7
branches:  trunk
changeset: 506752:e8a6c6456ee7
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat Jan 21 15:33:05 2006 +0000

description:
Fix up the comments, and add a fall-through for unrecognized archive
formats.

diffstat:

 mk/scripts/extract |  15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 232e76878ca7 -r e8a6c6456ee7 mk/scripts/extract
--- a/mk/scripts/extract        Sat Jan 21 14:44:34 2006 +0000
+++ b/mk/scripts/extract        Sat Jan 21 15:33:05 2006 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: extract,v 1.8 2006/01/21 14:31:56 jlam Exp $
+# $NetBSD: extract,v 1.9 2006/01/21 15:33:05 jlam Exp $
 #
 # Copyright (c) 2006 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -150,9 +150,7 @@
 *.Z)                   decompress_cat="${GZCAT}" ;;
 esac
 
-# Main extraction section -- this maps the suffix on the specified distfile
-# the correct tool and extraction procedure to perform the extraction.
-#
+# Derive the format of the archive based on the file extension.
 case "$distfile" in
 *.tar.gz|*.tgz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.Z|*.tar)
                _format=tar ;;
@@ -166,9 +164,11 @@
 *.bin)         _format=jre-bin ;;
 *)             _format=none ;;
 esac
-
 ${TEST} -n "$format" || format="$_format"
 
+# Use the correct tool and extraction procedure to perform the extraction
+# based on the archive format.
+#
 case "$format" in
 tar)
        case "$extract_using" in
@@ -243,4 +243,9 @@
        # By default, copy the distfile over to the current working directory.
        ${CP} "$distfile" .
        ;;
+
+*)
+       ${ECHO} 1>&2 "$self: archive format not recognized -- $format"
+       exit 1
+       ;;
 esac



Home | Main Index | Thread Index | Old Index