mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
fixed logic error and added --mini window for dialog
This commit is contained in:
@@ -124,13 +124,11 @@ caffeinate -dimsu & caffeinatePID=$!
|
|||||||
trap cleanupAndExit EXIT
|
trap cleanupAndExit EXIT
|
||||||
|
|
||||||
# display first screen
|
# display first screen
|
||||||
$dialog --title none \
|
$dialog --title "Installing $label" \
|
||||||
--message "" \
|
--message "" \
|
||||||
--hideicon \
|
--hideicon \
|
||||||
|
--mini \
|
||||||
--progress 100 \
|
--progress 100 \
|
||||||
--button1disabled \
|
|
||||||
--height 40 \
|
|
||||||
--width 500 \
|
|
||||||
--position bottomright \
|
--position bottomright \
|
||||||
--ontop \
|
--ontop \
|
||||||
--movable \
|
--movable \
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ fi
|
|||||||
while [[ -n $1 ]]; do
|
while [[ -n $1 ]]; do
|
||||||
if [[ $1 =~ ".*\=.*" ]]; then
|
if [[ $1 =~ ".*\=.*" ]]; then
|
||||||
# if an argument contains an = character, send it to eval
|
# if an argument contains an = character, send it to eval
|
||||||
printlog "setting variable from argument $1" WARN
|
printlog "setting variable from argument $1" INFO
|
||||||
eval $1
|
eval $1
|
||||||
else
|
else
|
||||||
# assume it's a label
|
# assume it's a label
|
||||||
@@ -104,8 +104,9 @@ fi
|
|||||||
# check Swift Dialog presence and version
|
# check Swift Dialog presence and version
|
||||||
DIALOG_CMD="/usr/local/bin/dialog"
|
DIALOG_CMD="/usr/local/bin/dialog"
|
||||||
|
|
||||||
if [[ -x $DIALOG_CMD ]]; then
|
if [[ ! -x $DIALOG_CMD ]]; then
|
||||||
# Swift Dialog is not installed, clear cmd file variable to ignore
|
# Swift Dialog is not installed, clear cmd file variable to ignore
|
||||||
|
printlog "SwiftDialog is not installed, clear cmd file var"
|
||||||
DIALOG_CMD_FILE=""
|
DIALOG_CMD_FILE=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user