summaryrefslogtreecommitdiff
path: root/scripts/repo-add.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/repo-add.sh.in')
-rw-r--r--scripts/repo-add.sh.in14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 506d524b..cff52d4e 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -28,6 +28,8 @@ export TEXTDOMAINDIR='@localedir@'
declare -r myver='@PACKAGE_VERSION@'
declare -r confdir='@sysconfdir@'
+LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
+
QUIET=0
DELTA=0
ONLYADDNEW=0
@@ -42,11 +44,12 @@ LOCKFILE=
CLEAN_LOCK=0
USE_COLOR='y'
+# Import libmakepkg
+source "$LIBRARY"/util/message.sh
+
# ensure we have a sane umask set
umask 0022
-m4_include(library/output_format.sh)
-
# print usage instructions
usage() {
cmd=${0##*/}
@@ -774,7 +777,12 @@ while (( $# )); do
shift
done
-m4_include(library/term_colors.sh)
+# check if messages are to be printed using color
+if [[ -t 2 && $USE_COLOR != "n" ]]; then
+ colorize
+else
+ unset ALL_OFF BOLD BLUE GREEN RED YELLOW
+fi
REPO_DB_FILE=${args[0]}
if [[ -z $REPO_DB_FILE ]]; then