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
|
||||
DEBUG=1
|
||||
|
||||
# notify behavior
|
||||
NOTIFY=success
|
||||
# options:
|
||||
# - success notify the user on success
|
||||
# - silent no notifications
|
||||
|
||||
|
||||
# behavior when blocking processes are found
|
||||
BLOCKING_PROCESS_ACTION=prompt_user
|
||||
# options:
|
||||
@@ -30,7 +37,6 @@ BLOCKING_PROCESS_ACTION=prompt_user
|
||||
# - 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.
|
||||
# for each label these variables can be set:
|
||||
#
|
||||
@@ -1250,8 +1256,15 @@ esac
|
||||
sleep 10 # wait a moment to let spotlight catch up
|
||||
getAppVersion
|
||||
|
||||
# TODO: notify when done
|
||||
if [[ $currentUser != "loginwindow" ]]; then
|
||||
if [[ -z $appversion ]]; then
|
||||
message="Installed $name"
|
||||
else
|
||||
message="Installed $name, version $appversion"
|
||||
fi
|
||||
|
||||
printlog "$message"
|
||||
|
||||
if [[ $currentUser != "loginwindow" && $NOTIFY == "success" ]]; then
|
||||
printlog "notifying"
|
||||
displaynotification "Installed $name, version $appversion" "Installation complete!"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user