summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"