mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
added variable NOTIFY which controls notifications, closes #24
This commit is contained in:
@@ -20,6 +20,13 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
|||||||
# also no actual installation will be performed
|
# also no actual installation will be performed
|
||||||
DEBUG=1
|
DEBUG=1
|
||||||
|
|
||||||
|
# notify behavior
|
||||||
|
NOTIFY=success
|
||||||
|
# options:
|
||||||
|
# - success notify the user on success
|
||||||
|
# - silent no notifications
|
||||||
|
|
||||||
|
|
||||||
# behavior when blocking processes are found
|
# behavior when blocking processes are found
|
||||||
BLOCKING_PROCESS_ACTION=prompt_user
|
BLOCKING_PROCESS_ACTION=prompt_user
|
||||||
# options:
|
# options:
|
||||||
@@ -30,7 +37,6 @@ BLOCKING_PROCESS_ACTION=prompt_user
|
|||||||
# - kill kill process without prompting or giving the user a chance to save
|
# - kill kill process without prompting or giving the user a chance to save
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Each workflow label needs to be listed in the case statement below.
|
# Each workflow label needs to be listed in the case statement below.
|
||||||
# for each label these variables can be set:
|
# for each label these variables can be set:
|
||||||
#
|
#
|
||||||
@@ -1250,8 +1256,15 @@ esac
|
|||||||
sleep 10 # wait a moment to let spotlight catch up
|
sleep 10 # wait a moment to let spotlight catch up
|
||||||
getAppVersion
|
getAppVersion
|
||||||
|
|
||||||
# TODO: notify when done
|
if [[ -z $appversion ]]; then
|
||||||
if [[ $currentUser != "loginwindow" ]]; then
|
message="Installed $name"
|
||||||
|
else
|
||||||
|
message="Installed $name, version $appversion"
|
||||||
|
fi
|
||||||
|
|
||||||
|
printlog "$message"
|
||||||
|
|
||||||
|
if [[ $currentUser != "loginwindow" && $NOTIFY == "success" ]]; then
|
||||||
printlog "notifying"
|
printlog "notifying"
|
||||||
displaynotification "Installed $name, version $appversion" "Installation complete!"
|
displaynotification "Installed $name, version $appversion" "Installation complete!"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user