use msg for messages

This commit is contained in:
Natanael Copa 2008-10-25 09:39:20 +00:00
parent 91465846cc
commit 75b479777f

10
abuild
View File

@ -27,10 +27,10 @@ default_cmds="checkdeps clean fetch checkmd5 unpack rootpkg"
all_cmds="checksum fetch unpack rootpkg build package cleancache clean srcpkg" all_cmds="checksum fetch unpack rootpkg build package cleancache clean srcpkg"
# functions # functions
vecho() { msg() {
local sub= local sub=
[ -n "$INSUB" ] && sub="(sub)" [ -n "$INSUB" ] && sub="(sub)"
[ -z "$quiet" ] && echo ">>> $pkgname:" "$@" $sub >&2 [ -z "$quiet" ] && echo ">>> $pkgname $sub:" "$@" >&2
} }
warning() { warning() {
@ -39,7 +39,7 @@ warning() {
die() { die() {
quiet= quiet=
vecho "$@" >&2 msg "$@" >&2
exit 1 exit 1
} }
@ -139,7 +139,7 @@ cleanpkg() {
runpart() { runpart() {
local part=$1 local part=$1
vecho "$part" msg "$part"
$part || die "$part failed" $part || die "$part failed"
} }
@ -318,7 +318,7 @@ trap 'die "Aborted by user"' INT
if [ -z "$1" ]; then if [ -z "$1" ]; then
if up2date && [ -z "$force" ]; then if up2date && [ -z "$force" ]; then
vecho "Package is up to date" msg "Package is up to date"
else else
set $default_cmds set $default_cmds
fi fi