From a181ea8fbe9f81017f84d4d1bff7632a992a5847 Mon Sep 17 00:00:00 2001 From: muxator Date: Sun, 29 Mar 2020 00:53:17 +0100 Subject: [PATCH] bin: replace double backticks (``) with $() This has been the recommended way of launching subshells for ages, and is easier to type and on the eye. For a quick reference, see: https://unix.stackexchange.com/questions/5778/whats-the-difference-between-stuff-and-stuff#5782 --- bin/buildDebian.sh | 2 +- bin/buildForWindows.sh | 2 +- bin/cleanRun.sh | 4 ++-- bin/debugRun.sh | 2 +- bin/installDeps.sh | 2 +- bin/run.sh | 4 ++-- bin/safeRun.sh | 2 +- bin/updatePlugins.sh | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bin/buildDebian.sh b/bin/buildDebian.sh index a0fa180a7..f1f5675ec 100755 --- a/bin/buildDebian.sh +++ b/bin/buildDebian.sh @@ -24,7 +24,7 @@ find ${SRC}/ -type d -exec chmod 0755 {} \; find ${SRC}/ -type f -exec chmod go-w {} \; chown -R root:root ${SRC}/ -let SIZE=`du -s ${SYSROOT} | sed s'/\s\+.*//'`+8 +let SIZE=$(du -s ${SYSROOT} | sed s'/\s\+.*//')+8 pushd ${SYSROOT}/ tar czf ${DIST}/data.tar.gz [a-z]* popd diff --git a/bin/buildForWindows.sh b/bin/buildForWindows.sh index 0977c6789..cda13a39d 100755 --- a/bin/buildForWindows.sh +++ b/bin/buildForWindows.sh @@ -3,7 +3,7 @@ NODE_VERSION="10.18.0" #Move to the folder where ep-lite is installed -cd `dirname $0` +cd $(dirname $0) #Was this script started in the bin folder? if yes move out if [ -d "../bin" ]; then diff --git a/bin/cleanRun.sh b/bin/cleanRun.sh index b2af478a5..379b770a5 100755 --- a/bin/cleanRun.sh +++ b/bin/cleanRun.sh @@ -1,7 +1,7 @@ #!/bin/sh #Move to the folder where ep-lite is installed -cd `dirname $0` +cd $(dirname $0) #Was this script started in the bin folder? if yes move out if [ -d "../bin" ]; then @@ -37,5 +37,5 @@ bin/installDeps.sh "$@" || exit 1 #Move to the node folder and start echo "Started Etherpad..." -SCRIPTPATH=`pwd -P` +SCRIPTPATH=$(pwd -P) node "${SCRIPTPATH}/node_modules/ep_etherpad-lite/node/server.js" "$@" diff --git a/bin/debugRun.sh b/bin/debugRun.sh index 710325084..246d53900 100755 --- a/bin/debugRun.sh +++ b/bin/debugRun.sh @@ -1,7 +1,7 @@ #!/bin/sh #Move to the folder where ep-lite is installed -cd `dirname $0` +cd $(dirname $0) #Was this script started in the bin folder? if yes move out if [ -d "../bin" ]; then diff --git a/bin/installDeps.sh b/bin/installDeps.sh index 49c996f46..429f63b9e 100755 --- a/bin/installDeps.sh +++ b/bin/installDeps.sh @@ -49,7 +49,7 @@ require_minimal_version() { } #Move to the folder where ep-lite is installed -cd `dirname $0` +cd $(dirname $0) #Was this script started in the bin folder? if yes move out if [ -d "../bin" ]; then diff --git a/bin/run.sh b/bin/run.sh index e9ea62440..74fa56d68 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -1,7 +1,7 @@ #!/bin/sh #Move to the folder where ep-lite is installed -cd `dirname $0` +cd $(dirname $0) #Was this script started in the bin folder? if yes move out if [ -d "../bin" ]; then @@ -34,6 +34,6 @@ bin/installDeps.sh "$@" || exit 1 #Move to the node folder and start echo "Started Etherpad..." -SCRIPTPATH=`pwd -P` +SCRIPTPATH=$(pwd -P) exec node "$SCRIPTPATH/node_modules/ep_etherpad-lite/node/server.js" "$@" diff --git a/bin/safeRun.sh b/bin/safeRun.sh index 484c325ea..99a72bcc0 100755 --- a/bin/safeRun.sh +++ b/bin/safeRun.sh @@ -19,7 +19,7 @@ LAST_EMAIL_SEND=0 LOG="$1" #Move to the folder where ep-lite is installed -cd `dirname $0` +cd $(dirname $0) #Was this script started in the bin folder? if yes move out if [ -d "../bin" ]; then diff --git a/bin/updatePlugins.sh b/bin/updatePlugins.sh index 63c447edf..ce7a46f6b 100755 --- a/bin/updatePlugins.sh +++ b/bin/updatePlugins.sh @@ -1,7 +1,7 @@ #!/bin/sh #Move to the folder where ep-lite is installed -cd `dirname $0` +cd $(dirname $0) #Was this script started in the bin folder? if yes move out if [ -d "../bin" ]; then @@ -9,7 +9,7 @@ if [ -d "../bin" ]; then fi # npm outdated --depth=0 | grep -v "^Package" | awk '{print $1}' | xargs npm install $1 --save-dev -OUTDATED=`npm outdated --depth=0 | grep -v "^Package" | awk '{print $1}'` +OUTDATED=$(npm outdated --depth=0 | grep -v "^Package" | awk '{print $1}') # echo $OUTDATED if test -n "$OUTDATED"; then echo "Plugins require update, doing this now..."