From f686127ede6a740e0b9094df8c6e6454137bc53f Mon Sep 17 00:00:00 2001 From: schmelzs Date: Thu, 25 Feb 2010 19:37:32 +0100 Subject: added bootstrap 1.0.22 --- contrib/debootstrap/debootstrap | 621 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 621 insertions(+) create mode 100755 contrib/debootstrap/debootstrap (limited to 'contrib/debootstrap/debootstrap') diff --git a/contrib/debootstrap/debootstrap b/contrib/debootstrap/debootstrap new file mode 100755 index 0000000..171a5ef --- /dev/null +++ b/contrib/debootstrap/debootstrap @@ -0,0 +1,621 @@ +#!/bin/sh -e + +VERSION='@VERSION@' + +unset TMP TEMP TMPDIR || true + +# might not be exported if we're running from init=/bin/sh or similar +export PATH + +########################################################################### + +if [ -z "$DEBOOTSTRAP_DIR" ]; then + if [ -x /debootstrap/debootstrap ]; then + DEBOOTSTRAP_DIR=/debootstrap + else + DEBOOTSTRAP_DIR=/usr/share/debootstrap + fi +fi + +DEVICES_TARGZ=$DEBOOTSTRAP_DIR/devices.tar.gz + +. $DEBOOTSTRAP_DIR/functions +exec 4>&1 + +LANG=C +USE_COMPONENTS=main +KEYRING="" +VARIANT="" + +DEF_MIRROR="http://ftp.us.debian.org/debian" + +export LANG USE_COMPONENTS +umask 022 + +########################################################################### + +## phases: +## finddebs dldebs printdebs first_stage second_stage + +RESOLVE_DEPS=true + +WHAT_TO_DO="finddebs dldebs first_stage second_stage" +am_doing_phase () { + # usage: if am_doing_phase finddebs; then ...; fi + local x; + for x in "$@"; do + if echo " $WHAT_TO_DO " | grep -q " $x "; then return 0; fi + done + return 1 +} + +########################################################################### + +usage_err() +{ + info USAGE1 "usage: [OPTION]... [ [