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