From a9fcf138a0dfb20352c4d646a2aba3204cbd742c Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 17 Jul 2023 22:57:28 -0500 Subject: [PATCH] Update default.inc --- default.inc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/default.inc b/default.inc index c31cb33..8b5fd71 100755 --- a/default.inc +++ b/default.inc @@ -180,17 +180,11 @@ DIVIDER(){ fi } DIVIDER_C(){ - if [ -z ${2+x} ]; then local clr='yellow' - else local clr=$2 - fi - if [ -z ${3+x} ]; then local length=70 - else local length=$3 - fi - local c=0; local dashes=''; until [ $c = ${length} ]; do local dashes="${dashes}-"; local c=`expr $c + 1`; done + [ -z ${2+x} ] && clr='yellow' || clr=$2 + [ -z ${3+x} ] && length=70 || length=$3 + c=0; dashes=''; until [ $c = ${length} ]; do dashes="${dashes}-"; c=`expr $c + 1`; done [ "${clr}" == "." ] && echo ${dashes} || echo -e "${idsCL[${clr}]}${dashes}${idsCL[Default]}" - if [ "$1" = true ]; then - echo "" - fi + [ "$1" = true ] && echo } service_exists() {