diff options
author | jlam <jlam> | 2006-01-21 18:21:08 +0000 |
---|---|---|
committer | jlam <jlam> | 2006-01-21 18:21:08 +0000 |
commit | 495ea6f630fdead3a6fbb47b794ca97d0afcd75f (patch) | |
tree | 937f924dd5be16278d36820f0acc298f3da99100 /mk/scripts/extract | |
parent | 9ce9293ebc7a65d7f2b95833df1fb50d7f3a599f (diff) | |
download | pkgsrc-495ea6f630fdead3a6fbb47b794ca97d0afcd75f.tar.gz |
Fix the case where -X excludefile is used so that we don't error out trying
to remove "".
Diffstat (limited to 'mk/scripts/extract')
-rwxr-xr-x | mk/scripts/extract | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mk/scripts/extract b/mk/scripts/extract index ff7411b373f..578cc268f51 100755 --- a/mk/scripts/extract +++ b/mk/scripts/extract @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: extract,v 1.12 2006/01/21 18:01:26 jlam Exp $ +# $NetBSD: extract,v 1.13 2006/01/21 18:21:08 jlam Exp $ # # Copyright (c) 2006 The NetBSD Foundation, Inc. # All rights reserved. @@ -113,6 +113,7 @@ usage() { ${ECHO} 1>&2 "usage: $self [-d dir] [-f format] [-t tarprog] [-X excludefile | -x] distfile [file ...]" } +exitcode=0 decompress_cat="${CAT}" exclude=no exclude_file= @@ -218,8 +219,9 @@ tar) set -- dummy; shift fi $decompress_cat "$distfile" | - $tarprog ${EXTRACT_OPTS_TAR} $exclude_flag -xf - "$@" \ - && ${RM} -f $tmpfile + $tarprog ${EXTRACT_OPTS_TAR} $exclude_flag -xf - "$@" + exitcode=$? + ${TEST} "$exclude" = "no" || ${RM} -f "$tmpfile" ;; *) ${ECHO} 1>&2 "$self: unknown tar program: $extract_using" @@ -273,3 +275,5 @@ none) exit 1 ;; esac + +exit $exitcode |