From 06a64a8ce3cbe0e9b7079114f821083ca3c3a8da Mon Sep 17 00:00:00 2001 From: Junichi Uekawa Date: Thu, 26 Feb 2009 12:53:15 +0900 Subject: refactor to use 'log' function rather than using 'echo' directly. First cut into doing this, hopefully we're not breaking anything. --- pdebuild-internal | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'pdebuild-internal') diff --git a/pdebuild-internal b/pdebuild-internal index 2d42145..ce624b2 100644 --- a/pdebuild-internal +++ b/pdebuild-internal @@ -38,10 +38,15 @@ export LOGNAME=root cd "$1" shift; +# dummy function that does enough, real one is defined elsewhere. +function log() { + echo "$*" +} + while [ -n "$1" ]; do case "$1" in --debbuildopts) - echo "Setting DEBBUILDOPTS=$2" + log "I: Setting DEBBUILDOPTS=$2" DEBBUILDOPTS="$2" shift; shift; ;; @@ -63,7 +68,7 @@ while [ -n "$1" ]; do shift; ;; --*) - echo "Error: Unknown option [$1] was specified " >&2 + log "E: Unknown option [$1] was specified " exit 1; ;; *) -- cgit v1.2.3