From 4272b37d3d9f112b9f089dafc2e7538c4c24f7b2 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Thu, 9 Jun 2011 20:43:25 +1000 Subject: scripts: refactor output formatting functions Move the common output formatting functions into a separate library file and import that into each script. makepkg is excluded due to its additional color formatting. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/pacman-key.sh.in | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'scripts/pacman-key.sh.in') diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in index 20ec20fa..a757c9b8 100644 --- a/scripts/pacman-key.sh.in +++ b/scripts/pacman-key.sh.in @@ -26,26 +26,7 @@ export TEXTDOMAINDIR='@localedir@' myver="@PACKAGE_VERSION@" -msg() { - local mesg=$1; shift - printf "==> ${mesg}\n" "$@" >&1 -} - -msg2() { - (( QUIET )) && return - local mesg=$1; shift - printf " -> ${mesg}\n" "$@" >&1 -} - -warning() { - local mesg=$1; shift - printf "==> $(gettext "WARNING:") ${mesg}\n" "$@" >&2 -} - -error() { - local mesg=$1; shift - printf "==> $(gettext "ERROR:") ${mesg}\n" "$@" >&2 -} +m4_include(library/output_format.sh) usage() { printf "pacman-key (pacman) %s\n" ${myver} -- cgit v1.2.3-24-g4f1b