X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=bb6d7ad4821db66a51408d29e1dec9fba66546a6;hp=cdb6c0a19935c7814885f87b896eb631dd89840c;hb=c4ffcff0a85b654adc06e0b1fe4ef06927e20b26;hpb=d965b4983de8c08698d60c3d23c446d0acba0e5e diff --git a/chroot-script b/chroot-script index cdb6c0a..bb6d7ad 100644 --- a/chroot-script +++ b/chroot-script @@ -4,7 +4,7 @@ # 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: Mon Apr 16 12:21:19 CEST 2007 [mika] +# Latest change: Mon Apr 16 13:12:14 CEST 2007 [mika] ################################################################################ set -e # exit on any error @@ -16,10 +16,10 @@ set -e # exit on any error # use aptitude only if it's available if [ -x /usr/bin/aptitude ] ; then - APTINSTALL='aptitude -y' + APTINSTALL='aptitude -y install ' APTUPDATE='aptitude update' else - APTINSTALL='apt-get --force-yes -y' + APTINSTALL='apt-get --force-yes -y install' APTUPDATE='apt-get update' fi @@ -32,12 +32,12 @@ fi # helper functions {{{ stage() { - if grep -q done "$STAGES/$1" 2>/dev/null ; then - echo " * Notice: stage $1 has been executed already, skipping execution therefore." - return 1 - else + if [ -n "$2" ] ; then echo "$2" > "$STAGES/$1" 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 + return 1 fi } # }}}