Return exit status in calcWidthAndRun() and calcHeightAndRun()

This commit is contained in:
Santiago Lo Coco 2021-12-30 14:45:13 -03:00
parent 962b795308
commit 40137ed07c
1 changed files with 8 additions and 2 deletions

View File

@ -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() {