From 83e2e4e46a784b8aaa939a98cd23fd1c10763951 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 13 Jan 2009 19:32:25 +0000 Subject: Fix --unpack-tarball= option (thanks, Torsten Landschoff; closes: #500759). r57243 --- debian/changelog | 2 ++ debootstrap | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 44fde38..111c0e2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ debootstrap (1.0.11) UNRELEASED; urgency=low * Rename 'repeat' to 'repeatn', since 'repeat' is a reserved word in zsh; although strictly speaking this seems like an incompatibility in zsh when linked to /bin/sh (closes: #340058). + * Fix --unpack-tarball= option (thanks, Torsten Landschoff; closes: + #500759). -- Colin Watson Fri, 31 Oct 2008 13:37:01 +0000 diff --git a/debootstrap b/debootstrap index bb85db4..c302195 100755 --- a/debootstrap +++ b/debootstrap @@ -203,16 +203,19 @@ if [ $# != 0 ] ; then error 1 NEEDARG "option requires an argument %s" "$1" fi ;; - --unpack-tarball) - if [ -n "$2" ] ; then - if [ ! -f "$2" ] ; then - error 1 NOTARBALL "%s: No such file or directory" "$2" - fi + --unpack-tarball|--unpack-tarball=?*) + if [ "$1" = "--unpack-tarball" -a -n "$2" ] ; then UNPACK_TARBALL="$2" shift 2 + elif [ "$1" != "${1#--unpack-tarball=}" ]; then + UNPACK_TARBALL="${1#--unpack-tarball=}" + shift else error 1 NEEDARG "option requires an argument %s" "$1" fi + if [ ! -f "$UNPACK_TARBALL" ] ; then + error 1 NOTARBALL "%s: No such file or directory" "$UNPACK_TARBALL" + fi ;; --include|--include=?*) if [ "$1" = "--include" -a -n "$2" ]; then -- cgit v0.12