aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates/bin
diff options
context:
space:
mode:
Diffstat (limited to 'priv/templates/bin')
-rwxr-xr-xpriv/templates/bin8
1 files changed, 6 insertions, 2 deletions
diff --git a/priv/templates/bin b/priv/templates/bin
index 8e3f497..3067259 100755
--- a/priv/templates/bin
+++ b/priv/templates/bin
@@ -2,8 +2,12 @@
set -e
-SCRIPT_DIR="$(dirname "$0")"
-RELEASE_ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
+SCRIPT=$(readlink $0)
+if [ -z $SCRIPT ]; then
+ SCRIPT=$0
+fi;
+SCRIPT_DIR="$(cd `dirname "$SCRIPT"` && pwd -P)"
+RELEASE_ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd -P)"
REL_NAME="{{ rel_name }}"
REL_VSN="{{ rel_vsn }}"
ERTS_VSN="{{ erts_vsn }}"