Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions phoebus-product/phoebus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# When deploying, change "TOP"
# to the absolute installation path
# TOP="."
TOP="$( cd "$(dirname "$0")" ; pwd -P )"
realpath=$(realpath "$0")
TOP=$(dirname "$realpath")

# Ideally, assert that Java is found
# export JAVA_HOME=/opt/jdk-9
Expand All @@ -19,15 +20,15 @@ fi
if [ -d "${TOP}/update" ]
then
echo "Installing update..."
cd ${TOP}
cd "${TOP}"
rm -rf doc lib
mv update/* .
rmdir update
echo "Updated."
fi


JAR=`echo ${TOP}/product-*.jar`
JAR=`echo "${TOP}"/product-*.jar`

# To get one instance, use server mode
OPT="-server 4918"
Expand All @@ -40,10 +41,10 @@ firstarg=$1;

if test "${firstarg#*$filter1}" != "$firstarg"; then
# Run MEDM converter etc. in foreground
java -Dfile.encoding=UTF-8 -jar $JAR $OPT "$@"
java -Dfile.encoding=UTF-8 -jar "$JAR" $OPT "$@"
elif test "${firstarg#*$filter2}" != "$firstarg"; then
java -Dfile.encoding=UTF-8 -jar $JAR $OPT "$@"
java -Dfile.encoding=UTF-8 -jar "$JAR" $OPT "$@"
else
# Run UI as separate thread
java -Dfile.encoding=UTF-8 -jar $JAR $OPT "$@" &
java -Dfile.encoding=UTF-8 -jar "$JAR" $OPT "$@" &
fi
Loading