diff --git a/bin/cleanRun.sh b/bin/cleanRun.sh index 288f5a040..b2af478a5 100755 --- a/bin/cleanRun.sh +++ b/bin/cleanRun.sh @@ -9,7 +9,7 @@ if [ -d "../bin" ]; then fi ignoreRoot=0 -for ARG in $* +for ARG in "$@" do if [ "$ARG" = "--root" ]; then ignoreRoot=1 @@ -32,10 +32,10 @@ fi rm -rf src/node_modules #Prepare the environment -bin/installDeps.sh $* || exit 1 +bin/installDeps.sh "$@" || exit 1 #Move to the node folder and start echo "Started Etherpad..." SCRIPTPATH=`pwd -P` -node "${SCRIPTPATH}/node_modules/ep_etherpad-lite/node/server.js" $* +node "${SCRIPTPATH}/node_modules/ep_etherpad-lite/node/server.js" "$@" diff --git a/bin/debugRun.sh b/bin/debugRun.sh index e187a0f0c..710325084 100755 --- a/bin/debugRun.sh +++ b/bin/debugRun.sh @@ -17,4 +17,4 @@ echo "Open 'chrome://inspect' on Chrome to start debugging." #Use 0.0.0.0 to allow external connections to the debugger #(ex: running Etherpad on a docker container). Use default port # (9229) -node --inspect=0.0.0.0:9229 node_modules/ep_etherpad-lite/node/server.js $* +node --inspect=0.0.0.0:9229 node_modules/ep_etherpad-lite/node/server.js "$@" diff --git a/bin/installDeps.sh b/bin/installDeps.sh index 345562bdd..49c996f46 100755 --- a/bin/installDeps.sh +++ b/bin/installDeps.sh @@ -83,7 +83,7 @@ require_minimal_version "nodejs" "$NODE_VERSION_STRING" "$REQUIRED_NODE_MAJOR" " #Get the name of the settings file settings="settings.json" a=''; -for arg in $*; do +for arg in "$@"; do if [ "$a" = "--settings" ] || [ "$a" = "-s" ]; then settings=$arg; fi a=$arg done diff --git a/bin/run.sh b/bin/run.sh index b80494791..e9ea62440 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -9,7 +9,7 @@ if [ -d "../bin" ]; then fi ignoreRoot=0 -for ARG in $* +for ARG in "$@" do if [ "$ARG" = "--root" ]; then ignoreRoot=1 @@ -29,11 +29,11 @@ if [ "$(id -u)" -eq 0 ] && [ $ignoreRoot -eq 0 ]; then fi #Prepare the environment -bin/installDeps.sh $* || exit 1 +bin/installDeps.sh "$@" || exit 1 #Move to the node folder and start echo "Started Etherpad..." SCRIPTPATH=`pwd -P` -exec node "$SCRIPTPATH/node_modules/ep_etherpad-lite/node/server.js" $* +exec node "$SCRIPTPATH/node_modules/ep_etherpad-lite/node/server.js" "$@"