aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgnas Vyšniauskas <[email protected]>2013-03-20 10:14:19 +0100
committersanmiguel <[email protected]>2016-04-13 21:46:35 +0200
commit9132af32d3df95e476baf8318948bbc1aae2d637 (patch)
treee43a584fd713c55d9f842d30fa0350f4259f603b
parentedced9e11a682a9484e7ad7eab2cc248d7cf8279 (diff)
downloadkerl-9132af32d3df95e476baf8318948bbc1aae2d637.tar.gz
kerl-9132af32d3df95e476baf8318948bbc1aae2d637.tar.bz2
kerl-9132af32d3df95e476baf8318948bbc1aae2d637.zip
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 <build> <path> However the ENV vars were being cleared/overriden, so you could only use `.kerlrc`. This fixes it.
-rwxr-xr-xkerl12
1 files changed, 7 insertions, 5 deletions
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