From 5b9984df80b233f59ba84ac947872c61cc93b3f7 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Wed, 24 May 2023 19:50:50 -0700 Subject: [PATCH] fixed recursion in function --- functions | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/functions b/functions index 96f86ad..23e5893 100644 --- a/functions +++ b/functions @@ -412,10 +412,10 @@ run-and-log(){ logger(){ if [ ! -z $logfile ] ; then if [ ! -f $logfile ] ; then - run mkdir -p ${rundir%/*} + #run mkdir -p ${rundir%/*} touch $logfile fi - $@ 2>&1 | tee >( + "$@" 2>&1 | tee >( while IFS= read -r line; do # strip any escaped strings for logging output _line=$(echo $line | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | tr -dc '[:print:]') @@ -513,7 +513,9 @@ install-dir() { success(){ _line="$@" echo -e "\n" - boxborder "${scriptname} ${grn}SUCCESS${dfl} ${_line}" + boxtop + boxline "${scriptname} ${grn}SUCCESS${dfl} ${_line}" + boxbottom exit 0 }