From 176443e75de5451f4160540d65ff94ea1564a2a7 Mon Sep 17 00:00:00 2001 From: Jerry Lee Date: Thu, 25 Jan 2024 01:49:01 +0800 Subject: [PATCH] =?UTF-8?q?refactor(`awl`):=20merge=20function=20`colorPri?= =?UTF-8?q?nt`=20into=20`rotateColorPrint`=20=F0=9F=9B=A0=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/a2l | 23 ++++++----------------- bin/coat | 2 +- bin/taoc | 2 +- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/bin/a2l b/bin/a2l index 468c4890..b18c5f7b 100755 --- a/bin/a2l +++ b/bin/a2l @@ -19,19 +19,6 @@ readonly PROG_VERSION='2.6.0-dev' # util functions ################################################################################ -colorPrint() { - local color=$1 - shift - # if stdout is a terminal, turn on color output. - # '-t' check: is a terminal? - # check isatty in bash https://stackoverflow.com/questions/10022323 - if [ -t 1 ]; then - printf '\e[1;%sm%s\e[0m\n' "$color" "$*" - else - printf '%s\n' "$*" - fi -} - usage() { cat <