From 394487fadbcd72666739282bf3f2c2f2f0df10fc Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Mon, 14 Sep 2020 23:36:03 -0600 Subject: [PATCH] add text formatting presets --- ab-openldap/ab-openldap-update.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ab-openldap/ab-openldap-update.sh b/ab-openldap/ab-openldap-update.sh index 9a951aa..6d1c20a 100755 --- a/ab-openldap/ab-openldap-update.sh +++ b/ab-openldap/ab-openldap-update.sh @@ -8,6 +8,22 @@ # https://git.asifbacchus.app/ab-docker/scripts/LICENSE # +### text formatting presets +if command -v tput > /dev/null; then + cyan=$(tput setaf 6) + err=$(tput bold)$(tput setaf 1) + magenta=$(tput setaf 5) + norm=$(tput sgr0) + ok=$(tput setaf 2) +else + cyan='' + err='' + magenta='' + norm='' + ok='' +fi + + ### pre-requisites # check if wget is installed