From 9e386b90a1118dc38d873f54cda3e61967e368db Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Fri, 14 Dec 2018 11:50:12 +0100 Subject: [PATCH] PRISM startup scripts: remove support for notification via NOTIFY='yes' Previously, the PRISM startup scripts on MacOS and Linux would call a GUI notification tool when the PRISM execution has finished and the environment variable NOTIFY was set to 'yes'. This feature was not advertised and probably not used much in practice. We remove it because it interferes with an exec-based mechanism of starting the Java VM for PRISM (see next commit). It is simple to get similar functionality by using a small wrapper script or other shell functionality. --- prism/src/bin/prism.darwin32 | 19 +------------------ prism/src/bin/prism.darwin64 | 19 +------------------ prism/src/bin/prism.linux | 19 +------------------ 3 files changed, 3 insertions(+), 54 deletions(-) diff --git a/prism/src/bin/prism.darwin32 b/prism/src/bin/prism.darwin32 index a43a0494..a8f2b830 100755 --- a/prism/src/bin/prism.darwin32 +++ b/prism/src/bin/prism.darwin32 @@ -5,14 +5,6 @@ # PRISM home directory PRISM_DIR=/home/luser/prism -# Default value for notification after the scipt has finished (yes/no) -NOTIFY_DEFAULT=no - -# Set value for notification -if [ "$NOTIFY" = "" ]; then - NOTIFY=$NOTIFY_DEFAULT -fi; - # Command to launch Java if [ "$PRISM_JAVA" = "" ]; then # On OS X, we want to avoiding calling java from the /usr/bin link @@ -120,15 +112,6 @@ if [ "$PRISM_DEBUG" != "" ]; then PRISM_JAVA="$PRISM_DEBUG" fi -# Run PRISM through Java +# Run PRISM through Java (exit code of script is exit code of the java call) "$PRISM_JAVA" $PRISM_JAVA_ARG1 $PRISM_JAVA_ARG2 $PRISM_JAVA_DEBUG $PRISM_JAVAMAXMEM $PRISM_JAVASTACKSIZE "$PRISM_ICON" "$PRISM_DOCK_NAME" -Djava.awt.headless=$PRISM_HEADLESS -Djava.library.path="$JAVA_LIBRARY_PATH" -classpath "$PRISM_CLASSPATH" $PRISM_MAINCLASS "$@" -PRISM_EXIT_CODE=$? - -if [ "$NOTIFY" = "yes" ]; then - if [ -n "`which growlnotify`" ]; then - growlnotify --image $PRISM_DIR/etc/icons/prism.ico PRISM has finished -m "" > /dev/null 2> /dev/null - fi -fi; - -exit $PRISM_EXIT_CODE diff --git a/prism/src/bin/prism.darwin64 b/prism/src/bin/prism.darwin64 index a43a0494..a8f2b830 100755 --- a/prism/src/bin/prism.darwin64 +++ b/prism/src/bin/prism.darwin64 @@ -5,14 +5,6 @@ # PRISM home directory PRISM_DIR=/home/luser/prism -# Default value for notification after the scipt has finished (yes/no) -NOTIFY_DEFAULT=no - -# Set value for notification -if [ "$NOTIFY" = "" ]; then - NOTIFY=$NOTIFY_DEFAULT -fi; - # Command to launch Java if [ "$PRISM_JAVA" = "" ]; then # On OS X, we want to avoiding calling java from the /usr/bin link @@ -120,15 +112,6 @@ if [ "$PRISM_DEBUG" != "" ]; then PRISM_JAVA="$PRISM_DEBUG" fi -# Run PRISM through Java +# Run PRISM through Java (exit code of script is exit code of the java call) "$PRISM_JAVA" $PRISM_JAVA_ARG1 $PRISM_JAVA_ARG2 $PRISM_JAVA_DEBUG $PRISM_JAVAMAXMEM $PRISM_JAVASTACKSIZE "$PRISM_ICON" "$PRISM_DOCK_NAME" -Djava.awt.headless=$PRISM_HEADLESS -Djava.library.path="$JAVA_LIBRARY_PATH" -classpath "$PRISM_CLASSPATH" $PRISM_MAINCLASS "$@" -PRISM_EXIT_CODE=$? - -if [ "$NOTIFY" = "yes" ]; then - if [ -n "`which growlnotify`" ]; then - growlnotify --image $PRISM_DIR/etc/icons/prism.ico PRISM has finished -m "" > /dev/null 2> /dev/null - fi -fi; - -exit $PRISM_EXIT_CODE diff --git a/prism/src/bin/prism.linux b/prism/src/bin/prism.linux index bc7f12d2..dc7a7a33 100755 --- a/prism/src/bin/prism.linux +++ b/prism/src/bin/prism.linux @@ -5,14 +5,6 @@ # PRISM home directory PRISM_DIR=/home/luser/prism -# Default value for notification after the scipt has finished (yes/no) -NOTIFY_DEFAULT=no - -# Set value for notification -if [ "$NOTIFY" = "" ]; then - NOTIFY=$NOTIFY_DEFAULT -fi; - # Command to launch Java if [ "$PRISM_JAVA" = "" ]; then PRISM_JAVA=java @@ -111,15 +103,6 @@ if [ "$PRISM_DEBUG" != "" ]; then PRISM_JAVA="$PRISM_DEBUG" fi -# Run PRISM through Java +# Run PRISM through Java (exit code of script is exit code of the java call) "$PRISM_JAVA" $PRISM_JAVA_ARG1 $PRISM_JAVA_ARG2 $PRISM_JAVA_DEBUG $PRISM_JAVAMAXMEM $PRISM_JAVASTACKSIZE -Djava.awt.headless=$PRISM_HEADLESS -Djava.library.path="$JAVA_LIBRARY_PATH" -classpath "$PRISM_CLASSPATH" $PRISM_MAINCLASS "$@" -PRISM_EXIT_CODE=$? - -if [ "$NOTIFY" = "yes" ]; then - if [ -n "`which notify-send`" ]; then - notify-send --icon=$PRISM_DIR/etc/icons/prism.ico "PRISM has finished" > /dev/null 2> /dev/null - fi -fi; - -exit $PRISM_EXIT_CODE