diff options
Diffstat (limited to 'rel/overlay/bin/remsh')
-rwxr-xr-x | rel/overlay/bin/remsh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rel/overlay/bin/remsh b/rel/overlay/bin/remsh index 2ac421b07..b8946ace3 100755 --- a/rel/overlay/bin/remsh +++ b/rel/overlay/bin/remsh @@ -12,7 +12,17 @@ # License for the specific language governing permissions and limitations under # the License. -COUCHDB_BIN_DIR=$(cd "${0%/*}" && pwd) +canonical_readlink () + { + cd $(dirname $1); + FILE=$(basename $1); + if [ -h "$FILE" ]; then + canonical_readlink $(readlink $FILE); + else + echo "$(pwd -P)"; + fi +} +COUCHDB_BIN_DIR=$(canonical_readlink $0) ERTS_BIN_DIR=$COUCHDB_BIN_DIR/../ ROOTDIR=${ERTS_BIN_DIR%/*} START_ERL=$(cat "$ROOTDIR/releases/start_erl.data") |