From d9d355db20cbb62706a66ea0daaced5430fd8a92 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 2 May 2013 15:07:00 -0400 Subject: chcleanup: define `msg2` and `error` internally, to avoid dep on libremessages --- src/chroot-tools/chcleanup | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup index 40db3c0..09e3355 100755 --- a/src/chroot-tools/chcleanup +++ b/src/chroot-tools/chcleanup @@ -8,7 +8,21 @@ # See: HOOKPREBUILD DRYRUN=${DRYRUN:-false} -source "$(which libremessages)" + +################################################################################ +# Define these here to avoid having dependencies on outside files + +msg2() { + local mesg=$1; shift + printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 +} + +error() { + local mesg=$1; shift + printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 +} + +################################################################################ if [[ ! -f /.arch-chroot ]] && ! ${DRYRUN}; then error "(chcleanup): Must be run inside of a chroot" -- cgit v1.2.3