mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-23 13:14:13 +00:00
fixed dialog check
This commit is contained in:
@@ -7,19 +7,6 @@ if ! is-at-least 10.14 $installedOSversion; then
|
|||||||
exit 98
|
exit 98
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check Swift Dialog presence and version
|
|
||||||
DIALOG_CMD="/usr/local/bin/dialog"
|
|
||||||
|
|
||||||
if [[ -x $DIALOG_CMD ]]; then
|
|
||||||
# Swift Dialog is not installed, clear cmd file variable to ignore
|
|
||||||
DIALOG_CMD_FILE=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! is-at-least 1.11.2 "$(/usr/local/bindialog --version)"; then
|
|
||||||
# list item progress is only available with SD 1.11.2 and higher
|
|
||||||
DIALOG_LIST_ITEM_NAME=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# MARK: argument parsing
|
# MARK: argument parsing
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
@@ -113,6 +100,15 @@ if [[ "$(whoami)" != "root" && "$DEBUG" -eq 0 ]]; then
|
|||||||
cleanupAndExit 6 "not running as root, exiting" ERROR
|
cleanupAndExit 6 "not running as root, exiting" ERROR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# check Swift Dialog presence and version
|
||||||
|
DIALOG_CMD="/usr/local/bin/dialog"
|
||||||
|
|
||||||
|
if [[ -x $DIALOG_CMD ]]; then
|
||||||
|
# Swift Dialog is not installed, clear cmd file variable to ignore
|
||||||
|
DIALOG_CMD_FILE=""
|
||||||
|
fi
|
||||||
|
|
||||||
# MARK: labels in case statement
|
# MARK: labels in case statement
|
||||||
case $label in
|
case $label in
|
||||||
longversion)
|
longversion)
|
||||||
|
|||||||
Reference in New Issue
Block a user