aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates/bin.dtl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2015-04-28 22:36:44 -0500
committerTristan Sloughter <[email protected]>2015-05-08 11:16:53 -0500
commit88d1f29257869b0de9369881236477163804125a (patch)
treec14b95ae8efdebcf074d314b6b0afb662f3454fb /priv/templates/bin.dtl
parenta36609536aaf7d98b5bd5d3364cab739dc6689b5 (diff)
downloadrelx-88d1f29257869b0de9369881236477163804125a.tar.gz
relx-88d1f29257869b0de9369881236477163804125a.tar.bz2
relx-88d1f29257869b0de9369881236477163804125a.zip
use mustache instead of erlydtl for overlays
Diffstat (limited to 'priv/templates/bin.dtl')
-rwxr-xr-xpriv/templates/bin.dtl63
1 files changed, 0 insertions, 63 deletions
diff --git a/priv/templates/bin.dtl b/priv/templates/bin.dtl
deleted file mode 100755
index dd11707..0000000
--- a/priv/templates/bin.dtl
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/sh
-
-set -e
-
-SCRIPT_DIR="$(dirname "$0")"
-RELEASE_ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
-REL_NAME="{{ rel_name }}"
-REL_VSN="{{ rel_vsn }}"
-ERTS_VSN="{{ erts_vsn }}"
-REL_DIR="$RELEASE_ROOT_DIR/releases/$REL_VSN"
-ERL_OPTS="{{ erl_opts }}"
-
-find_erts_dir() {
- local erts_dir="$RELEASE_ROOT_DIR/erts-$ERTS_VSN"
- if [ -d "$erts_dir" ]; then
- ERTS_DIR="$erts_dir";
- ROOTDIR="$RELEASE_ROOT_DIR"
- else
- local erl="$(which erl)"
- code="io:format(\"~s\", [code:root_dir()]), halt()."
- local erl_root="$("$erl" -noshell -eval "$code")"
- ERTS_DIR="$erl_root/erts-$ERTS_VSN"
- ROOTDIR="$erl_root"
- fi
-}
-
-find_sys_config() {
- local possible_sys="$REL_DIR/sys.config"
- if [ -f "$possible_sys" ]; then
- SYS_CONFIG="$possible_sys"
- fi
-}
-
-find_vm_args() {
- local possible_vm_args="$REL_DIR/vm.args"
- if [ -f "$possible_vm_args" ]; then
- VM_ARGS="$possible_vm_args"
- fi
-}
-
-find_erts_dir
-find_sys_config
-find_vm_args
-export ROOTDIR="$RELEASE_ROOT_DIR"
-export BINDIR="$ERTS_DIR/bin"
-export EMU="beam"
-export PROGNAME="erl"
-export LD_LIBRARY_PATH="$ERTS_DIR/lib:$LD_LIBRARY_PATH"
-ERTS_LIB_DIR="$ERTS_DIR/../lib"
-[ -f "$REL_DIR/$REL_NAME.boot" ] && BOOTFILE="$REL_NAME" || BOOTFILE=start
-cd "$ROOTDIR"
-
-# Save extra arguments
-ARGS="$@"
-
-# Build arguments for erlexec
-set -- "$ERL_OPTS"
-[ "$SYS_CONFIG" ] && set -- "$@" -config "$SYS_CONFIG"
-[ "$VM_ARGS" ] && set -- "$@" -args_file "$VM_ARGS"
-set -- "$@" -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" -boot "$REL_DIR/$BOOTFILE" "$ARGS"
-
-# Boot the release
-$BINDIR/erlexec $@