You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2020/01/31 16:22:43 UTC
[couchdb] branch master updated: fix: re-allow spaces in startup
paths (#2504)
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/master by this push:
new 6124187 fix: re-allow spaces in startup paths (#2504)
6124187 is described below
commit 6124187883922536808d09a5573c959c950e8aa3
Author: Jan Lehnardt <ja...@apache.org>
AuthorDate: Fri Jan 31 17:22:33 2020 +0100
fix: re-allow spaces in startup paths (#2504)
---
rel/files/couchdb.in | 10 +++++-----
rel/overlay/bin/remsh | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/rel/files/couchdb.in b/rel/files/couchdb.in
index 3d7ee11..c6ee7c9 100755
--- a/rel/files/couchdb.in
+++ b/rel/files/couchdb.in
@@ -14,15 +14,15 @@
canonical_readlink ()
{
- cd $(dirname $1);
- FILE=$(basename $1);
+ FILE=$(dirname "$1")/$(basename "$1");
if [ -h "$FILE" ]; then
- canonical_readlink $(readlink $FILE);
+ cd $(dirname "$1")
+ canonical_readlink $(readlink "$FILE");
else
- echo "$(pwd -P)";
+ cd "${1%/*}" && pwd -P;
fi
}
-COUCHDB_BIN_DIR=$(canonical_readlink $0)
+COUCHDB_BIN_DIR=$(canonical_readlink "$0")
ERTS_BIN_DIR=$COUCHDB_BIN_DIR/../
cd "$COUCHDB_BIN_DIR/../"
diff --git a/rel/overlay/bin/remsh b/rel/overlay/bin/remsh
index b8946ac..c5e932a 100755
--- a/rel/overlay/bin/remsh
+++ b/rel/overlay/bin/remsh
@@ -14,15 +14,15 @@
canonical_readlink ()
{
- cd $(dirname $1);
- FILE=$(basename $1);
+ FILE=$(dirname "$1")/$(basename "$1");
if [ -h "$FILE" ]; then
- canonical_readlink $(readlink $FILE);
+ cd $(dirname "$1")
+ canonical_readlink $(readlink "$FILE");
else
- echo "$(pwd -P)";
+ cd "${1%/*}" && pwd -P;
fi
}
-COUCHDB_BIN_DIR=$(canonical_readlink $0)
+COUCHDB_BIN_DIR=$(canonical_readlink "$0")
ERTS_BIN_DIR=$COUCHDB_BIN_DIR/../
ROOTDIR=${ERTS_BIN_DIR%/*}
START_ERL=$(cat "$ROOTDIR/releases/start_erl.data")