Use by default dialog

This commit is contained in:
Santiago Lo Coco 2022-02-01 16:17:16 -03:00
parent 21bd5171d0
commit 49ae05dde9
1 changed files with 8 additions and 8 deletions

View File

@ -4,7 +4,7 @@ usage() {
cat << EOF cat << EOF
usage: ${0##*/} [command] usage: ${0##*/} [command]
-h | --help Print this help message. -h | --help Print this help message.
-d | --dialog Use dialog. -w | --whiptail Use whiptail.
-t | --text Print plain text to stdout (without dialog or whiptail). -t | --text Print plain text to stdout (without dialog or whiptail).
-l | --log Log to sadedot.log file. -l | --log Log to sadedot.log file.
-p | --packages Run scripts/install.sh at the end of this script. -p | --packages Run scripts/install.sh at the end of this script.
@ -18,16 +18,16 @@ checkParameters() {
usage usage
exit 0 exit 0
;; ;;
-d | --dialog) -w | --whiptail)
checkForDependencies "dialog" checkForDependencies "libnewt"
setDialogBox "dialog" setDialogBox "whiptail"
;; ;;
-t | --text) -t | --text)
setDialogBox "plain" setDialogBox "plain"
;; ;;
-l | --log) -l | --log)
checkForDependencies "libnewt" checkForDependencies "dialog"
setDialogBox "whiptail" setDialogBox "dialog"
setLogToFile true "$(pwd -P)" setLogToFile true "$(pwd -P)"
;; ;;
-p | --packages) -p | --packages)
@ -42,8 +42,8 @@ checkParameters() {
done done
if [ -z "$(getDialogBox)" ]; then if [ -z "$(getDialogBox)" ]; then
checkForDependencies "libnewt" checkForDependencies "dialog"
setDialogBox "whiptail" setDialogBox "dialog"
fi fi
} }