aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2015-06-24 13:14:26 -0500
committerTristan Sloughter <[email protected]>2015-06-24 13:14:26 -0500
commit3b2c57acb963ffb2d5fd128927851c953a558f9b (patch)
tree11ecf2c63e8b624edc20f9b04616d93ac18cbabd /priv/templates
parent1d29547668dc0927cb56d84970a435022cab8411 (diff)
parentacb38431b1076e3443deaf32952748a3a5489e8a (diff)
downloadrelx-3b2c57acb963ffb2d5fd128927851c953a558f9b.tar.gz
relx-3b2c57acb963ffb2d5fd128927851c953a558f9b.tar.bz2
relx-3b2c57acb963ffb2d5fd128927851c953a558f9b.zip
Merge pull request #355 from jaredmorrow/jem-run-script-bashisms
Remove bashisms from run scripts
Diffstat (limited to 'priv/templates')
-rwxr-xr-xpriv/templates/bin26
-rwxr-xr-xpriv/templates/extended_bin16
2 files changed, 21 insertions, 21 deletions
diff --git a/priv/templates/bin b/priv/templates/bin
index dd11707..8e3f497 100755
--- a/priv/templates/bin
+++ b/priv/templates/bin
@@ -11,30 +11,30 @@ 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";
+ __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)"
+ __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"
+ __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"
+ __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"
+ __possible_vm_args="$REL_DIR/vm.args"
+ if [ -f "$__possible_vm_args" ]; then
+ VM_ARGS="$__possible_vm_args"
fi
}
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin
index 452669c..64409ae 100755
--- a/priv/templates/extended_bin
+++ b/priv/templates/extended_bin
@@ -13,16 +13,16 @@ ERL_OPTS="{{ erl_opts }}"
RUNNER_LOG_DIR="${RUNNER_LOG_DIR:-$RELEASE_ROOT_DIR/log}"
find_erts_dir() {
- local erts_dir="$RELEASE_ROOT_DIR/erts-$ERTS_VSN"
- if [ -d "$erts_dir" ]; then
- ERTS_DIR="$erts_dir";
+ __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)"
+ __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"
+ __erl_root="$("$__erl" -noshell -eval "$code")"
+ ERTS_DIR="$__erl_root/erts-$ERTS_VSN"
+ ROOTDIR="$__erl_root"
fi
}
@@ -216,7 +216,7 @@ case "$1" in
if ! relx_nodetool "stop"; then
exit 1
fi
- while $(kill -0 "$PID" 2>/dev/null);
+ while $(kill -s 0 "$PID" 2>/dev/null);
do
sleep 1
done