Replace calcWidth and calcHeight function calls with calcAndRun
This commit is contained in:
parent
bcae0175ec
commit
507438831b
12
install.sh
12
install.sh
|
@ -23,7 +23,7 @@ updateSystemClock() {
|
||||||
|
|
||||||
printAndExit() {
|
printAndExit() {
|
||||||
str="${1} Therefore, the installation process will stop, but you can continue where you left off by running:\n\nsh calsais"
|
str="${1} Therefore, the installation process will stop, but you can continue where you left off by running:\n\nsh calsais"
|
||||||
calcHeightAndRun dialog --msgbox "\"\n${str}\"" HEIGHT 59
|
calcAndRun dialog --msgbox "\"\n${str}\"" HEIGHT 59
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ debug() {
|
||||||
}
|
}
|
||||||
|
|
||||||
installPackage() {
|
installPackage() {
|
||||||
calcWidthAndRun dialog --infobox "\"\nInstalling '$1'.\"" 5 WIDTH
|
calcAndRun dialog --infobox "\"\nInstalling '$1'.\"" 5 WIDTH
|
||||||
case ${3} in
|
case ${3} in
|
||||||
A)
|
A)
|
||||||
if [ "$debugFlagToStdout" = true ] || [ "$debugFlag" = true ]; then
|
if [ "$debugFlagToStdout" = true ] || [ "$debugFlag" = true ]; then
|
||||||
|
@ -353,7 +353,7 @@ calcAndRun() {
|
||||||
}
|
}
|
||||||
|
|
||||||
askForPassword() {
|
askForPassword() {
|
||||||
password=$(calcWidthAndRun dialog --insecure --passwordbox "\"\nNow, enter the password for santioaguit-pc.\"" 10 WIDTH)
|
password=$(calcAndRun dialog --insecure --passwordbox "\"\nNow, enter the password for santioaguit-pc.\"" 10 WIDTH)
|
||||||
exitIfCancel "You must enter a password."
|
exitIfCancel "You must enter a password."
|
||||||
passwordRep=$(dialog --insecure --passwordbox "\nReenter password." 10 30 3>&1 1>&2 2>&3)
|
passwordRep=$(dialog --insecure --passwordbox "\nReenter password." 10 30 3>&1 1>&2 2>&3)
|
||||||
exitIfCancel "You must enter a password."
|
exitIfCancel "You must enter a password."
|
||||||
|
@ -416,7 +416,7 @@ loadVar() {
|
||||||
tryLoadVar() {
|
tryLoadVar() {
|
||||||
loadVar "$1"
|
loadVar "$1"
|
||||||
if [ -z "${!1}" ]; then
|
if [ -z "${!1}" ]; then
|
||||||
calcWidthAndRun dialog --msgbox "\"\nCouldn't load '$1'. Try to run the script again.\"" 7 WIDTH
|
calcAndRun dialog --msgbox "\"\nCouldn't load '$1'. Try to run the script again.\"" 7 WIDTH
|
||||||
rm -f calsais.vars
|
rm -f calsais.vars
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -496,7 +496,7 @@ checkForSystemdUnit() {
|
||||||
systemctl is-active --quiet "${2}" && return
|
systemctl is-active --quiet "${2}" && return
|
||||||
fi
|
fi
|
||||||
forceExit=false
|
forceExit=false
|
||||||
calcWidthAndRun dialog --infobox "\"\nWaiting for the ${1} to finish. Please wait.\"" 5 WIDTH
|
calcAndRun dialog --infobox "\"\nWaiting for the ${1} to finish. Please wait.\"" 5 WIDTH
|
||||||
if [ "${3}" = "oneshot" ]; then
|
if [ "${3}" = "oneshot" ]; then
|
||||||
while [ $forceExit = false ]; do
|
while [ $forceExit = false ]; do
|
||||||
result=$(systemctl show -p ActiveState --value "${2}")
|
result=$(systemctl show -p ActiveState --value "${2}")
|
||||||
|
@ -585,7 +585,7 @@ runScript() {
|
||||||
clear
|
clear
|
||||||
fi
|
fi
|
||||||
|
|
||||||
calcWidthAndRun dialog --title "calsais" --msgbox "\"\n${welcomeMsg}\"" 7 WIDTH
|
calcAndRun dialog --title "calsais" --msgbox "\"\n${welcomeMsg}\"" 7 WIDTH
|
||||||
|
|
||||||
while [ $i -lt "${#steps[@]}" ]; do
|
while [ $i -lt "${#steps[@]}" ]; do
|
||||||
step=${steps[$i]}
|
step=${steps[$i]}
|
||||||
|
|
Loading…
Reference in New Issue