aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsanmiguel <[email protected]>2017-08-03 18:45:26 -0500
committersanmiguel <[email protected]>2017-08-03 18:45:26 -0500
commit4986ebe61e8a0f3aafacee2a027ea89feaed1bf7 (patch)
tree557977a441b6136b7123d2b4e239c4f9093d7b48
parent5daa0345916cea13ae0e82ddf7b03f58503910f8 (diff)
downloadkerl-shell_history_otp_20.tar.gz
kerl-shell_history_otp_20.tar.bz2
kerl-shell_history_otp_20.zip
Always add shell_history to ERL_AFLAGSkerl-shell_history_otp_20
Even for erlangs before 20.0 - it should have no effect
-rwxr-xr-xkerl19
1 files changed, 6 insertions, 13 deletions
diff --git a/kerl b/kerl
index 32b01db..986054b 100755
--- a/kerl
+++ b/kerl
@@ -768,6 +768,12 @@ REBAR_PLT_DIR="$absdir"
export REBAR_PLT_DIR
_KERL_ACTIVE_DIR="$absdir"
export _KERL_ACTIVE_DIR
+# https://twitter.com/mononcqc/status/877544929496629248
+export _KERL_SAVED_ERL_AFLAGS=" \$ERL_AFLAGS"
+kernel_history=\$(echo "\$ERL_AFLAGS" | grep "kernel shell_history")
+if [ -z "\$kernel_history" ]; then
+ export ERL_AFLAGS="-kernel shell_history enabled \$ERL_AFLAGS"
+fi
if [ -f "$KERL_CONFIG" ]; then . "$KERL_CONFIG"; fi
if [ -n "\$KERL_ENABLE_PROMPT" ]; then
_KERL_SAVED_PS1="\$PS1"
@@ -900,19 +906,6 @@ endif
rehash
ACTIVATE_CSH
- otpver=$(get_otp_version "$rel")
- if [ $otpver -ge 20 ]; then
- # https://twitter.com/mononcqc/status/877544929496629248
- cat << OTP_20_ADDITION >> "$absdir/activate"
-_KERL_SAVED_ERL_AFLAGS=" \$ERL_AFLAGS"
-export _KERL_SAVED_ERL_AFLAGS
-kernel_history=\$(echo "\$ERL_AFLAGS" | grep "kernel shell_history")
-if [ -z "\$kernel_history" ]; then
- export ERL_AFLAGS="-kernel shell_history enabled \$ERL_AFLAGS"
-fi
-OTP_20_ADDITION
- fi
-
if [ -n "$KERL_BUILD_DOCS" ]; then
DOC_DIR="$KERL_BUILD_DIR/$1/release_$rel/lib/erlang"
if [ -d "$DOC_DIR" ]; then