From 0bbb320d4cb048377815da1387f39a6a4564a944 Mon Sep 17 00:00:00 2001 From: Mina Ghobrial Date: Tue, 14 Jul 2020 14:51:20 +0300 Subject: [PATCH 1/2] Removes computer font from logging command. --- log4bash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log4bash.sh b/log4bash.sh index 8c17690..6b385de 100755 --- a/log4bash.sh +++ b/log4bash.sh @@ -100,7 +100,7 @@ log_debug() { log "$1" "DEBUG" "${LOG_DEBUG_COLOR}"; } log_captains() { if type -P figlet >/dev/null; then - figlet -f computer -w 120 "$1"; + figlet -w 120 "$1"; else log "$1"; fi From b676042bc386c52620bd408d7d090f54ee7827dd Mon Sep 17 00:00:00 2001 From: Mina Ghobrial Date: Tue, 14 Jul 2020 15:59:05 +0300 Subject: [PATCH 2/2] Adds support to devices without computer font --- log4bash.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/log4bash.sh b/log4bash.sh index 6b385de..721e60d 100755 --- a/log4bash.sh +++ b/log4bash.sh @@ -100,7 +100,11 @@ log_debug() { log "$1" "DEBUG" "${LOG_DEBUG_COLOR}"; } log_captains() { if type -P figlet >/dev/null; then - figlet -w 120 "$1"; + if figlet -f computer >/dev/null 2>&1; then + figlet -f computer -w 120 "$1"; + else + figlet -w 120 "$1"; + fi else log "$1"; fi