diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2018-06-28 19:19:43 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2018-10-21 12:22:19 +0200 |
commit | b5d62d2c91a2caf5c18945921cdf12af6f36b2d4 (patch) | |
tree | 9e127c1174be7a72de4b059c7128990782a5902d /scripts/pkgdelta.sh.in | |
parent | 3561c872ca0980c76442fcbf3985cc92a8f572f7 (diff) | |
download | pacman-b5d62d2c91a2caf5c18945921cdf12af6f36b2d4.tar.gz pacman-b5d62d2c91a2caf5c18945921cdf12af6f36b2d4.tar.xz |
Port scripts to use libmakepkg's messaging code.
Remove all remnants of library/{output_format,term_colors}.sh
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/pkgdelta.sh.in')
-rw-r--r-- | scripts/pkgdelta.sh.in | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/pkgdelta.sh.in b/scripts/pkgdelta.sh.in index ae88d1bf..b0b0b21f 100644 --- a/scripts/pkgdelta.sh.in +++ b/scripts/pkgdelta.sh.in @@ -30,7 +30,8 @@ declare -r myver='@PACKAGE_VERSION@' LIBRARY=${LIBRARY:-'@libmakepkgdir@'} -# Import parseopts.sh +# Import libmakepkg +source "$LIBRARY"/util/message.sh source "$LIBRARY"/util/parseopts.sh # Options @@ -47,8 +48,6 @@ max_delta_size=70 # ensure we have a sane umask set umask 0022 -m4_include(library/output_format.sh) - # print usage instructions usage() { printf "pkgdelta (pacman) %s\n" "${myver}" @@ -208,7 +207,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 if (( $# != 2 )); then usage |