diff options
author | Jared Morrow <[email protected]> | 2015-06-23 08:32:34 -0600 |
---|---|---|
committer | Jared Morrow <[email protected]> | 2015-06-23 08:32:34 -0600 |
commit | cf5ed973dbfadd5edcc1d7d9e7ddcfcc202769df (patch) | |
tree | 883b740e93e46ff6c77f68950283a21ec87ea8bf /priv/templates/extended_bin | |
parent | 1d29547668dc0927cb56d84970a435022cab8411 (diff) | |
download | relx-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/extended_bin')
-rwxr-xr-x | priv/templates/extended_bin | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin index 452669c..59f46b3 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"; + 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 } @@ -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 |