From 9122e5f7e7f5c171b3b38818f8f2feb2a03b5537 Mon Sep 17 00:00:00 2001 From: Sebastian Castro Date: Tue, 8 Sep 2020 09:53:28 +0200 Subject: [PATCH] Fix fastRun.sh I copied the run.sh, remove the dependency check --- bin/fastRun.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/bin/fastRun.sh b/bin/fastRun.sh index e00bb8c72..e08518e24 100755 --- a/bin/fastRun.sh +++ b/bin/fastRun.sh @@ -7,16 +7,17 @@ # of what to do, please execute bin/installDeps.sh once before running this # script. -set -eu +pecho() { printf %s\\n "$*"; } +log() { pecho "$@"; } +error() { log "ERROR: $@" >&2; } +fatal() { error "$@"; exit 1; } -# source: https://stackoverflow.com/questions/59895/how-to-get-the-source-directory-of-a-bash-script-from-within-the-script-itself#246128 -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +# Move to the folder where ep-lite is installed +cd "$(dirname "$0")"/.. -echo "Running directly, without checking/installing dependencies" -# move to the base Etherpad directory. This will be necessary until Etherpad -# learns to run from arbitrary CWDs. -cd "${DIR}/.." +# Move to the node folder and start +log "Starting Etherpad..." -# run Etherpad main class -node "${DIR}/../node_modules/ep_etherpad-lite/node/server.js" "${@}" +SCRIPTPATH=$(pwd -P) +exec node "$SCRIPTPATH/node_modules/ep_etherpad-lite/node/server.js" "$@"