added variable NOTIFY which controls notifications, closes #24

This commit is contained in:
Armin Briegel
2020-05-29 16:59:25 +02:00
parent ce88a3f3c8
commit b12bd875cd

View File

@@ -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