mirror of
https://github.com/mtan93/Installomator.git
synced 2026-04-01 22:04:24 +01:00
code cleanup
This commit is contained in:
@@ -14,10 +14,10 @@ icon=${6:-"/System/Applications/App Store.app/Contents/Resources/AppIcon.icns"}
|
|||||||
|
|
||||||
dialogUpdate() {
|
dialogUpdate() {
|
||||||
# $1: dialog command
|
# $1: dialog command
|
||||||
local dcommand=$1
|
local dcommand="$1"
|
||||||
|
|
||||||
if [[ -n $dialog_command_file ]]; then
|
if [[ -n $dialog_command_file ]]; then
|
||||||
echo "$dcommand" >> $dialog_command_file
|
echo "$dcommand" >> "$dialog_command_file"
|
||||||
echo "Dialog: $dcommand"
|
echo "Dialog: $dcommand"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ dialogUpdate() {
|
|||||||
# MARK: sanity checks
|
# MARK: sanity checks
|
||||||
|
|
||||||
# check minimal macOS requirement
|
# check minimal macOS requirement
|
||||||
if [[ $(sw_vers -buildVersion ) < "20" ]]; then
|
if [[ $(sw_vers -buildVersion ) < "20A" ]]; then
|
||||||
echo "This script requires at least macOS 11 Big Sur."
|
echo "This script requires at least macOS 11 Big Sur."
|
||||||
exit 98
|
exit 98
|
||||||
fi
|
fi
|
||||||
@@ -55,6 +55,6 @@ open -a /Library/Application\ Support/Dialog/Dialog.app --args \
|
|||||||
--position bottomright \
|
--position bottomright \
|
||||||
--ontop \
|
--ontop \
|
||||||
--movable \
|
--movable \
|
||||||
--commandfile $dialog_command_file
|
--commandfile "$dialog_command_file"
|
||||||
|
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
|
|||||||
@@ -5,16 +5,16 @@ dialog_command_file=${4:-"/var/tmp/dialog.log"}
|
|||||||
|
|
||||||
dialogUpdate() {
|
dialogUpdate() {
|
||||||
# $1: dialog command
|
# $1: dialog command
|
||||||
local dcommand=$1
|
local dcommand="$1"
|
||||||
|
|
||||||
if [[ -n $dialog_command_file ]]; then
|
if [[ -n $dialog_command_file ]]; then
|
||||||
echo "$dcommand" >> $dialog_command_file
|
echo "$dcommand" >> "$dialog_command_file"
|
||||||
echo "Dialog: $dcommand"
|
echo "Dialog: $dcommand"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# check minimal macOS requirement
|
# check minimal macOS requirement
|
||||||
if [[ $(sw_vers -buildVersion ) < "20" ]]; then
|
if [[ $(sw_vers -buildVersion ) < "20A" ]]; then
|
||||||
echo "This script requires at least macOS 11 Big Sur."
|
echo "This script requires at least macOS 11 Big Sur."
|
||||||
exit 98
|
exit 98
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user