From 19cd9faa8e52df52605df563cdb65e411d142983 Mon Sep 17 00:00:00 2001 From: Veera-began Date: Sun, 3 Dec 2023 02:36:47 -0600 Subject: [PATCH] Fix space issue in path #2251 --- .../src/assembly/static/bin/gremlin.sh | 18 +++++++++--------- .../assembly/static/bin/janusgraph-server.sh | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/janusgraph-dist/src/assembly/static/bin/gremlin.sh b/janusgraph-dist/src/assembly/static/bin/gremlin.sh index 5672991a17..71d4e6223a 100755 --- a/janusgraph-dist/src/assembly/static/bin/gremlin.sh +++ b/janusgraph-dist/src/assembly/static/bin/gremlin.sh @@ -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" @@ -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 "$@" diff --git a/janusgraph-dist/src/assembly/static/bin/janusgraph-server.sh b/janusgraph-dist/src/assembly/static/bin/janusgraph-server.sh index 5f610ad748..d3a2892c42 100755 --- a/janusgraph-dist/src/assembly/static/bin/janusgraph-server.sh +++ b/janusgraph-dist/src/assembly/static/bin/janusgraph-server.sh @@ -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 @@ -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)