diff options
author | mail_redacted_for_web | 2021-09-17 12:45:29 +0200 |
---|---|---|
committer | mail_redacted_for_web | 2021-09-17 12:45:29 +0200 |
commit | e0c2abe8776f2d128636bf2561c4389bf145cceb (patch) | |
tree | 6b0b1219459ecb3f10a6804410cbda069f735288 /issues | |
parent | 01abe525cbe2b0a58856988d2dc3bde25f684268 (diff) | |
download | etcissue-e0c2abe8776f2d128636bf2561c4389bf145cceb.tar.bz2 |
display without figlet
Diffstat (limited to 'issues')
-rwxr-xr-x | issues/display | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/issues/display b/issues/display index a66553d..0a19d43 100755 --- a/issues/display +++ b/issues/display @@ -11,6 +11,14 @@ for i in "${FARR[@]}";do IFS=$'\n' FLARR=( $(cat "$i") ) unset IFS - if command -v figlet >/dev/null;then printf "%b\\n" "$i"|figlet; else printf "%b\\n" "$i";fi + if [ -z "$COLUMNS" ];then + COLUMNS="$(tput cols)" + [ -z "$COLUMNS"] && COLUMNS=20 + fi + printf "\\033[;1m" + for ((j=0;j<$COLUMNS;++j)); do printf -- "-"; done + printf "\\n %b\\n" "$i" + for ((j=0;j<$COLUMNS;++j)); do printf -- "-"; done + printf "\\033[0m\\n" printf "%b\\n" "${FLARR[@]}" done |