aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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