diff options
author | Junichi Uekawa <dancer@netfort.gr.jp> | 2009-02-26 12:53:15 +0900 |
---|---|---|
committer | Junichi Uekawa <dancer@netfort.gr.jp> | 2009-02-26 14:33:11 +0900 |
commit | 06a64a8ce3cbe0e9b7079114f821083ca3c3a8da (patch) | |
tree | 516660a2366b18b40d1a823ba1ec188a39a59634 /pbuilder-createbuildenv | |
parent | 37597b2cb6439cce9571de83218586b0a99e6ea9 (diff) | |
download | pbuilder-06a64a8ce3cbe0e9b7079114f821083ca3c3a8da.tar pbuilder-06a64a8ce3cbe0e9b7079114f821083ca3c3a8da.tar.gz |
refactor to use 'log' function rather than using 'echo' directly.
First cut into doing this, hopefully we're not breaking anything.
Diffstat (limited to 'pbuilder-createbuildenv')
-rwxr-xr-x | pbuilder-createbuildenv | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv index 770fe60..d304f17 100755 --- a/pbuilder-createbuildenv +++ b/pbuilder-createbuildenv @@ -26,7 +26,7 @@ set -e if [ -z "$DISTRIBUTION" ]; then DISTRIBUTION=sid fi -echo "Distribution is $DISTRIBUTION." +log "I: Distribution is $DISTRIBUTION." if [ "${PBUILDER_DEBUGMODE}" = "yes" ]; then TRAP="echo ignoring trap " @@ -37,37 +37,37 @@ fi # first clean it. cleanbuildplace -echo "Building the build environment" +log "I: Building the build environment" mkdir -p "$BUILDPLACE" if [ ! -d "$BUILDPLACE" ]; then - echo "E: Could not make directory [$BUILDPLACE]" >&2 + log "E: Could not make directory [$BUILDPLACE]" exit 1 fi $TRAP cleanbuildplace exit -echo " -> running $DEBOOTSTRAP" +log "I: running $DEBOOTSTRAP" unset DEBOOTSTRAPSCRIPT if [ -n "$HOOKDIR" ]; then if [ -f "$HOOKDIR/$DISTRIBUTION" ]; then DEBOOTSTRAPSCRIPT=$(readlink -f "$HOOKDIR")"/$DISTRIBUTION" - echo " -> Applying user distribution dist build script $DEBOOTSTRAPSCRIPT" + log "I: Applying user distribution dist build script $DEBOOTSTRAPSCRIPT" fi fi if which "${DEBOOTSTRAP}"; then : # debootstrap exists else - echo "E: ${DEBOOTSTRAP} does not exist, install or change DEBOOTSTRAP option" >&2 + log "E: ${DEBOOTSTRAP} does not exist, install or change DEBOOTSTRAP option" exit 1 fi if ! ( cd "$BUILDPLACE" && "${DEBOOTSTRAP}" "${DEBOOTSTRAPOPTS[@]}" "$DISTRIBUTION" . "$MIRRORSITE" $DEBOOTSTRAPSCRIPT ) ; then - echo "pbuilder: $DEBOOTSTRAP failed" >&2 + log "E: $DEBOOTSTRAP failed" exit 1 fi -echo " -> debootstrap finished" +log "I: debootstrap finished" loadhooks @@ -78,8 +78,8 @@ installaptlines executehooks "G" -echo "Refreshing the base.tgz " -echo " -> upgrading packages" +log "I: Refreshing the base.tgz " +log "I: upgrading packages" mountproc $TRAP umountproc_cleanbuildplace_trap exit sighup $CHROOTEXEC /usr/bin/apt-get update |