Last active
October 11, 2015 22:47
-
-
Save eerohele/3931030 to your computer and use it in GitHub Desktop.
Eclipse Help Startup Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ECLIPSE_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
LOGFILE="$ECLIPSE_HOME/configuration/run.log" | |
JAVA_CLASS=org.eclipse.help.standalone.Infocenter | |
COMMAND=$1 | |
PRODUCT=$2 | |
PORT=$3 | |
send_command() { | |
echo "Sending command \"$1\" to $JAVA_CLASS in port $PORT..." | |
if [ "$1" == "start" ]; then | |
echo "Logging into file $LOGFILE." | |
fi | |
java -classpath $ECLIPSE_HOME/plugins/org.eclipse.help.base*.jar \ | |
$JAVA_CLASS -eclipsehome $ECLIPSE_HOME \ | |
-command $1 -product $2 -port $3 -noexec > $LOGFILE 2>&1 & | |
} | |
if [ -z "$PORT" ]; then | |
PORT=8083 | |
fi | |
if [ -z "$PRODUCT" ] && [ "$COMMAND" != "shutdown" ]; then | |
echo "Usage: $0 command product_name [port_number]" | |
exit 1 | |
fi | |
send_command $COMMAND $PRODUCT $PORT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment