Skip to content

Commit b95899e

Browse files
authored
Merge pull request #3845 from krisztianloki/Allow-symlinks-to-phoebus.sh
Allow symlinks to phoebus.sh
2 parents d31ca94 + 2802198 commit b95899e

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

phoebus-product/phoebus.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# When deploying, change "TOP"
66
# to the absolute installation path
77
# TOP="."
8-
TOP="$( cd "$(dirname "$0")" ; pwd -P )"
8+
realpath=$(realpath "$0")
9+
TOP=$(dirname "$realpath")
910

1011
# Ideally, assert that Java is found
1112
# export JAVA_HOME=/opt/jdk-9
@@ -19,15 +20,15 @@ fi
1920
if [ -d "${TOP}/update" ]
2021
then
2122
echo "Installing update..."
22-
cd ${TOP}
23+
cd "${TOP}"
2324
rm -rf doc lib
2425
mv update/* .
2526
rmdir update
2627
echo "Updated."
2728
fi
2829

2930

30-
JAR=`echo ${TOP}/product-*.jar`
31+
JAR=`echo "${TOP}"/product-*.jar`
3132

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

4142
if test "${firstarg#*$filter1}" != "$firstarg"; then
4243
# Run MEDM converter etc. in foreground
43-
java -Dfile.encoding=UTF-8 -jar $JAR $OPT "$@"
44+
java -Dfile.encoding=UTF-8 -jar "$JAR" $OPT "$@"
4445
elif test "${firstarg#*$filter2}" != "$firstarg"; then
45-
java -Dfile.encoding=UTF-8 -jar $JAR $OPT "$@"
46+
java -Dfile.encoding=UTF-8 -jar "$JAR" $OPT "$@"
4647
else
4748
# Run UI as separate thread
48-
java -Dfile.encoding=UTF-8 -jar $JAR $OPT "$@" &
49+
java -Dfile.encoding=UTF-8 -jar "$JAR" $OPT "$@" &
4950
fi

0 commit comments

Comments
 (0)