From 30c4b8d5b808cf236071ed28f59857dd99b489c9 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Thu, 25 Nov 2021 16:07:23 +0100 Subject: [PATCH] LUCENE-10259: Fix startup scripts to allow whitespace in path names and use /bin/sh only (#472) --- lucene/distribution/src/binary-release/bin/luke.cmd | 2 +- lucene/distribution/src/binary-release/bin/luke.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lucene/distribution/src/binary-release/bin/luke.cmd b/lucene/distribution/src/binary-release/bin/luke.cmd index 26f75776bc1..cb8b1e3ece3 100644 --- a/lucene/distribution/src/binary-release/bin/luke.cmd +++ b/lucene/distribution/src/binary-release/bin/luke.cmd @@ -17,5 +17,5 @@ SETLOCAL SET MODULES=%~dp0.. -start javaw --module-path %MODULES%\modules;%MODULES%\modules-thirdparty --add-modules org.apache.logging.log4j --module lucene.luke +start javaw --module-path "%MODULES%\modules;%MODULES%\modules-thirdparty" --add-modules org.apache.logging.log4j --module lucene.luke ENDLOCAL diff --git a/lucene/distribution/src/binary-release/bin/luke.sh b/lucene/distribution/src/binary-release/bin/luke.sh index e2db65453ef..1593ac6d804 100644 --- a/lucene/distribution/src/binary-release/bin/luke.sh +++ b/lucene/distribution/src/binary-release/bin/luke.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -15,5 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -MODULES=$(cd $(dirname $0)/.. && pwd) -java --module-path $MODULES/modules:$MODULES/modules-thirdparty --add-modules org.apache.logging.log4j --module lucene.luke +MODULES=`dirname "$0"`/.. +MODULES=`cd "$MODULES" && pwd` +java --module-path "$MODULES/modules:$MODULES/modules-thirdparty" --add-modules org.apache.logging.log4j --module lucene.luke