Bug#742672: allow debootstrap to take a bare codename as the script parameter
Package: debootstrap
Version: 1.0.59
Very closely related to #742671 (in which supplying "sid" for
"base-installer/debootstrap_script" causes an error), I realized it
might be ideal if the fix came in both directions.
I've attached a patch that allows $4 (script) to be either an absolute
path or a path/file within /usr/share/debootstrap/scripts, so that
values like "sid" or "wheezy" can be supplied as the "script" argument
and DWIM.
Here's some proposed d/changelog text:
[ Tianon Gravi ]
* Allow "script" argument to be specified as either an absolute path
as before, or as a raw codename such as "sid", assumed to be
relative to "/usr/share/debootstrap/scripts".
Of course, as I noted on #742671, I'm very happy to adapt this to better
match expected contribution style or scripting style. :)
♥,
- Tianon
diff --git a/debootstrap b/debootstrap
index fef1ab5..125e8bc 100755
--- a/debootstrap
+++ b/debootstrap
@@ -391,7 +391,11 @@ else
SUPPORTED_VARIANTS="$VARIANT"
fi
if [ "$4" != "" ]; then
- SCRIPT="$4"
+ if [ -e "$DEBOOTSTRAP_DIR/scripts/$4" ]; then
+ SCRIPT="$DEBOOTSTRAP_DIR/scripts/$4"
+ else
+ SCRIPT="$4"
+ fi
fi
fi
Reply to: