From 2d12b68952c554963147f4640670c4964fa2dcc6 Mon Sep 17 00:00:00 2001 From: neil Date: Fri, 2 Sep 2016 20:55:11 +0800 Subject: [PATCH] minor --- acme.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/acme.sh b/acme.sh index d4493b06..58dbbd0a 100755 --- a/acme.sh +++ b/acme.sh @@ -46,15 +46,23 @@ fi __green() { - printf '\033[1;31;32m' + if [ -t 1 ] ; then + printf '\033[1;31;32m' + fi printf -- "$1" - printf '\033[0m' + if [ -t 1 ] ; then + printf '\033[0m' + fi } __red() { - printf '\033[1;31;40m' + if [ -t 1 ] ; then + printf '\033[1;31;40m' + fi printf -- "$1" - printf '\033[0m' + if [ -t 1 ] ; then + printf '\033[0m' + fi } _info() {