From 40137ed07ca57f8dc271491db459954f01ff5b59 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Thu, 30 Dec 2021 14:45:13 -0300 Subject: [PATCH] Return exit status in calcWidthAndRun() and calcHeightAndRun() --- install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index b0ec024..46ca113 100755 --- a/install.sh +++ b/install.sh @@ -205,7 +205,10 @@ networkConf() { calcWidthAndRun() { width=$(echo "$@" | grep -oP '(?<=").*?(?=")' | wc -c) - echo $(eval $(echo "$@" | sed "s/WIDTH/$((${width}+8))/g")) + toReturn=$(eval $(echo "$@" | sed "s/WIDTH/$((${width}+8))/g")) + exitStatus=$? + echo $toReturn + return $exitStatus } calcHeightAndRun() { @@ -216,7 +219,10 @@ calcHeightAndRun() { x = (($1 - $2 + ($2 * 60)) / 60) printf "%d", (x == int(x)) ? x : int(x) + 1 }') - echo $(eval $(echo "$@" | sed "s/HEIGHT/$((5+$height))/g")) + toReturn=$(eval $(echo "$@" | sed "s/HEIGHT/$((5+$height))/g")) + exitStatus=$? + echo $toReturn + return $exitStatus } askForPassword() {