Commit 75b47977 authored by Natanael Copa's avatar Natanael Copa

use msg for messages

parent 91465846
...@@ -27,10 +27,10 @@ default_cmds="checkdeps clean fetch checkmd5 unpack rootpkg" ...@@ -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() { ...@@ -39,7 +39,7 @@ warning() {
die() { die() {
quiet= quiet=
vecho "$@" >&2 msg "$@" >&2
exit 1 exit 1
} }
...@@ -139,7 +139,7 @@ cleanpkg() { ...@@ -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 ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment