aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates/bin
diff options
context:
space:
mode:
authorJared Morrow <[email protected]>2015-06-23 08:32:34 -0600
committerJared Morrow <[email protected]>2015-06-23 08:32:34 -0600
commitcf5ed973dbfadd5edcc1d7d9e7ddcfcc202769df (patch)
tree883b740e93e46ff6c77f68950283a21ec87ea8bf /priv/templates/bin
parent1d29547668dc0927cb56d84970a435022cab8411 (diff)
downloadrelx-cf5ed973dbfadd5edcc1d7d9e7ddcfcc202769df.tar.gz
relx-cf5ed973dbfadd5edcc1d7d9e7ddcfcc202769df.tar.bz2
relx-cf5ed973dbfadd5edcc1d7d9e7ddcfcc202769df.zip
Remove bashisms from run scripts
This commit removes the bashisms in `bin` and `extended_bin`. Both of these scripts used `local` variables which are a bash addition and aren't supported on Solaris/SmartOS /bin/sh. To keep the local intention of the variables, they were renamed from $var to $l_var. In addition, `extended_bin` used `kill -SIGNAL $PID` which is also not in Solaris `kill`.
Diffstat (limited to 'priv/templates/bin')
-rwxr-xr-xpriv/templates/bin26
1 files changed, 13 insertions, 13 deletions
diff --git a/priv/templates/bin b/priv/templates/bin
index dd11707..625f90b 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";
+ l_erts_dir="$RELEASE_ROOT_DIR/erts-$ERTS_VSN"
+ if [ -d "$l_erts_dir" ]; then
+ ERTS_DIR="$l_erts_dir";
ROOTDIR="$RELEASE_ROOT_DIR"
else
- local erl="$(which erl)"
+ l_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"
+ l_erl_root="$("$l_erl" -noshell -eval "$code")"
+ ERTS_DIR="$l_erl_root/erts-$ERTS_VSN"
+ ROOTDIR="$l_erl_root"
fi
}
find_sys_config() {
- local possible_sys="$REL_DIR/sys.config"
- if [ -f "$possible_sys" ]; then
- SYS_CONFIG="$possible_sys"
+ l_possible_sys="$REL_DIR/sys.config"
+ if [ -f "$l_possible_sys" ]; then
+ SYS_CONFIG="$l_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"
+ l_possible_vm_args="$REL_DIR/vm.args"
+ if [ -f "$l_possible_vm_args" ]; then
+ VM_ARGS="$l_possible_vm_args"
fi
}