X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=7de9a27f84cd8252391fd6b0f7c7af33a95f2a2f;hp=d9d3202301319136ea2ee3ff21fe7f20fb8697c6;hb=a6478ca712353a2fa3a20c299862ffc65ce4c4c4;hpb=049beca624626061dc7943ad9a2c2d8c7778ba5d diff --git a/grml-debootstrap b/grml-debootstrap index d9d3202..7de9a27 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -4,13 +4,13 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Die Jun 05 14:23:38 CEST 2007 [mika] +# Latest change: Mit Mär 26 22:44:03 CET 2008 [mika] ################################################################################ # http://www.debian.org/releases/stable/i386/index.html.en set -e # exit on any error -VERSION='0.10' +VERSION='0.17' # source core functions {{{ . /etc/grml/lsb-functions @@ -77,7 +77,7 @@ while [ "$#" -gt "0" ] ; do shift GROOT=$1 ;; - --release) + -r|--release) shift RELEASE=$1 ;; @@ -125,7 +125,7 @@ if [ -z "$STAGES" ] ; then [ -d "$STAGES" ] || mkdir -p "$STAGES" fi -if [ -r $STAGES/grml-debootstrap ] ; then +if [ -r "$STAGES"/grml-debootstrap ] ; then if grep -q done $STAGES/grml-debootstrap ; then eerror "Error: grml-debootstrap has been executed already, won't continue therefore." eerror "If you want to re-execute grml-debootstrap just manually remove ${STAGES}" ; eend 1 @@ -161,13 +161,15 @@ else fi # make sure we have the right syntax when using an iso image -case $ISO in - file*) # do nothing - ;; - *) - ISO=file:$1 - ;; -esac +if [ -n "$ISO" ] ; then + case $ISO in + file*) # do nothing + ;; + *) + ISO=file:$1 + ;; + esac +fi ISODIR=${ISO##file:} ISODIR=${ISODIR%%/} @@ -222,6 +224,9 @@ stage() { return 0 elif grep -q done "$STAGES/$1" 2>/dev/null ; then ewarn "Notice: stage $1 has been executed already, skipping execution therefore." ; eend 0 + eindent + ewarn "To reexecute it clean up the according directory inside $STAGES" ; eend 0 + eoutdent return 1 fi } @@ -436,4 +441,4 @@ else fi ## END OF FILE ################################################################# -# vim: ai tw=100 expandtab foldmethod=marker +# vim: ai tw=100 expandtab foldmethod=marker shiftwidth=3