summaryrefslogtreecommitdiff
path: root/src/chroot-tools
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-05-02 15:07:00 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-05-02 15:07:00 -0400
commitd9d355db20cbb62706a66ea0daaced5430fd8a92 (patch)
treed72526a083460e44e41769624b0172efd4cd86d1 /src/chroot-tools
parent962250da23024224fc9e0be782b16ae08df46671 (diff)
chcleanup: define `msg2` and `error` internally, to avoid dep on libremessages
Diffstat (limited to 'src/chroot-tools')
-rwxr-xr-xsrc/chroot-tools/chcleanup16
1 files changed, 15 insertions, 1 deletions
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"