Skip to content

Commit

Permalink
Fix space issue in path JanusGraph#2251
Browse files Browse the repository at this point in the history
  • Loading branch information
Veera-began committed Dec 3, 2023
1 parent d2a3854 commit 19cd9fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions janusgraph-dist/src/assembly/static/bin/gremlin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,26 @@ while [ -h "${SCRIPT_NAME}" ]; do
done
BIN="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# Set $CFG to $BIN/../conf
cd -P $BIN/../conf
cd -P "$BIN/../conf"
CFG=$(pwd)
# Set $LIB to $BIN/../lib
cd -P $BIN/../lib
# Set $LIB to "$BIN/../lib"
cd -P "$BIN/../lib"
LIB=$(pwd)
# Set $LIB to $BIN/../ext
cd -P $BIN/../ext
cd -P "$BIN/../ext"
EXT=$(pwd)
# Initialize classpath to $CFG
CP="$CFG"
# Add the slf4j-log4j12 binding
CP="$CP":$(find -L $LIB -name 'slf4j-log4j12*.jar' | sort | tr '\n' ':')
CP="$CP":$(find -L "$LIB" -name 'slf4j-log4j12*.jar' | sort | tr '\n' ':')
# Add the jars in $BIN/../lib that start with "janusgraph"
CP="$CP":$(find -L $LIB -name 'janusgraph*.jar' | sort | tr '\n' ':')
CP="$CP":$(find -L "$LIB" -name 'janusgraph*.jar' | sort | tr '\n' ':')
# Add the remaining jars in $BIN/../lib.
CP="$CP":$(find -L $LIB -name '*.jar' \
CP="$CP":$(find -L "$LIB" -name '*.jar' \
\! -name 'janusgraph*' \
\! -name 'slf4j-log4j12*.jar' | sort | tr '\n' ':')
# Add the jars in $BIN/../ext (at any subdirectory depth)
CP="$CP":$(find -L $EXT -name '*.jar' | sort | tr '\n' ':')
CP="$CP":$(find -L "$EXT" -name '*.jar' | sort | tr '\n' ':')

cd ..
SYSTEM_EXT_DIR="`pwd`/ext"
Expand Down Expand Up @@ -125,4 +125,4 @@ if [ -n "$SCRIPT_DEBUG" ]; then
fi

# Start the JVM, execute the application, and return its exit code
exec $JAVA $JAVA_OPTIONS $MAIN_CLASS "$@"
exec $JAVA "$JAVA_OPTIONS" $MAIN_CLASS "$@"
8 changes: 4 additions & 4 deletions janusgraph-dist/src/assembly/static/bin/janusgraph-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ COLLECTED_JAVA_OPTIONS_FILE=""

# Read user-defined JVM options from jvm.options file
if [[ -z "$JAVA_OPTIONS_FILE" ]]; then
jver=$($JAVA -version 2>&1 | grep 'version' 2>&1 | awk -F\" '{ split($2,a,"."); print a[1]"."a[2]}')
jver=$("$JAVA" -version 2>&1 | grep 'version' 2>&1 | awk -F\" '{ split($2,a,"."); print a[1]"."a[2]}')
if [[ $jver == "1.8" ]]; then
JAVA_OPTIONS_FILE="$JANUSGRAPH_CONF/jvm-8.options"
else
Expand All @@ -130,11 +130,11 @@ if [[ -z "$CP" ]];then
# Initialize classpath to $JANUSGRAPH_CFG
CP="${JANUSGRAPH_CONF}"
# Add the slf4j-log4j12 binding
CP="$CP":$(find -L $JANUSGRAPH_LIB -name 'slf4j-log4j12*.jar' | sort | tr '\n' ':')
CP="$CP":$(find -L "$JANUSGRAPH_LIB" -name 'slf4j-log4j12*.jar' | sort | tr '\n' ':')
# Add the jars in $JANUSGRAPH_HOME/lib that start with "janusgraph"
CP="$CP":$(find -L $JANUSGRAPH_LIB -name 'janusgraph*.jar' | sort | tr '\n' ':')
CP="$CP":$(find -L "$JANUSGRAPH_LIB" -name 'janusgraph*.jar' | sort | tr '\n' ':')
# Add the remaining jars in $JANUSGRAPH_HOME/lib.
CP="$CP":$(find -L $JANUSGRAPH_LIB -name '*.jar' \
CP="$CP":$(find -L "$JANUSGRAPH_LIB" -name '*.jar' \
\! -name 'janusgraph*' \
\! -name 'slf4j-log4j12*.jar' | sort | tr '\n' ':')
# Add the jars in $BIN/../ext (at any subdirectory depth)
Expand Down

0 comments on commit 19cd9fa

Please sign in to comment.