diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:48 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:28 +0100 |
commit | 799d4bfb31c279b72088c8ee8a16c2710ab8a309 (patch) | |
tree | 4bbc1758ceaa46c5e81fe9d66ccdaacfec047ef8 /helpers/lh_bootstrap_debootstrap | |
parent | 677415f6d7efc1e5b888570d70af311d2900c69c (diff) | |
download | live-build-799d4bfb31c279b72088c8ee8a16c2710ab8a309.zip live-build-799d4bfb31c279b72088c8ee8a16c2710ab8a309.tar.gz |
Adding live-helper 1.0~a3-1.
Diffstat (limited to 'helpers/lh_bootstrap_debootstrap')
-rwxr-xr-x | helpers/lh_bootstrap_debootstrap | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/helpers/lh_bootstrap_debootstrap b/helpers/lh_bootstrap_debootstrap index 8ff83af..ab7ac6b 100755 --- a/helpers/lh_bootstrap_debootstrap +++ b/helpers/lh_bootstrap_debootstrap @@ -1,6 +1,11 @@ #!/bin/sh # lh_bootstrap_debootstrap(1) - bootstrap a Debian system with debootstrap(8) +# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org> +# +# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +# This is free software, and you are welcome to redistribute it +# under certain conditions; see COPYING for details. set -e @@ -10,6 +15,13 @@ do . ${FUNCTION} done +# Set static variables +DESCRIPTION="bootstrap a Debian system with debootstrap(8)" +HELP="" +USAGE="${PROGRAM} [--force]" + +Arguments "${@}" + # Ensure that a system is built as root lh_testroot @@ -46,17 +58,17 @@ fi if [ -x "/usr/sbin/debootstrap" ] then - # Restore old cache - if [ -d cache/bootstrap ] - then - mkdir -p chroot/var/cache/apt/archives - cp cache/bootstrap/*.deb chroot/var/cache/apt/archives - fi - if [ "${LH_CACHE}" = "enabled" ] then + # Restore old cache + if [ -d cache/bootstrap ] + then + mkdir -p chroot/var/cache/apt/archives + cp cache/bootstrap/*.deb chroot/var/cache/apt/archives + fi + # Executing debootstrap (download-only) - debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_LOCAL}" "${LIVE_DEBOOTSTRAP_SCRIPT}" + debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_BUILD}" "${LIVE_DEBOOTSTRAP_SCRIPT}" # Removing old cache if [ -d cache/bootstrap ] @@ -74,14 +86,14 @@ then fi # Executing debootstrap (regular run) - debootstrap ${DEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_LOCAL}" "${LIVE_DEBOOTSTRAP_SCRIPT}" + debootstrap ${DEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_BUILD}" "${LIVE_DEBOOTSTRAP_SCRIPT}" + + # Removing bootstrap cache + rm -rf chroot/var/cache/apt/archives/*.deb + + # Creating stage file + Create_stagefile .stage/bootstrap else echo "E: Can't process file /usr/bin/debootstrap (FIXME)" exit 1 fi - -# Removing bootstrap cache -rm -rf chroot/var/cache/apt/archives/*.deb - -# Creating stage file -Create_stagefile .stage/bootstrap |