From 9132af32d3df95e476baf8318948bbc1aae2d637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignas=20Vy=C5=A1niauskas?= Date: Wed, 20 Mar 2013 10:14:19 +0100 Subject: Do not clear ENV config vars According to the docs it is possible to configure kerl both by using `.kerlrc` and passing ENV variables from the command-line, i.e. KERL_INSTALL_MANPAGES=yes ./kerl install However the ENV vars were being cleared/overriden, so you could only use `.kerlrc`. This fixes it. --- kerl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'kerl') diff --git a/kerl b/kerl index 68f3750..7dc7e17 100755 --- a/kerl +++ b/kerl @@ -26,11 +26,13 @@ GREP_OPTIONS='' ERLANG_DOWNLOAD_URL=http://www.erlang.org/download -KERL_BASE_DIR="$HOME"/.kerl -KERL_CONFIG="$HOME"/.kerlrc -KERL_DOWNLOAD_DIR="${KERL_BASE_DIR:?}"/archives -KERL_BUILD_DIR="${KERL_BASE_DIR:?}"/builds -KERL_GIT_DIR="${KERL_BASE_DIR:?}"/gits +# Default values +: ${KERL_BASE_DIR:="$HOME"/.kerl} +: ${KERL_CONFIG:="$HOME"/.kerlrc} +: ${KERL_DOWNLOAD_DIR:="${KERL_BASE_DIR:?}"/archives} +: ${KERL_BUILD_DIR:="${KERL_BASE_DIR:?}"/builds} +: ${KERL_GIT_DIR:="${KERL_BASE_DIR:?}"/gits} + if [ -n "$KERL_CONFIGURE_OPTIONS" ]; then _KCO="$KERL_CONFIGURE_OPTIONS" fi -- cgit v1.2.3