From 4c3122fedbe242a607acda360ba4d544dcb9d5b4 Mon Sep 17 00:00:00 2001 From: sanmiguel Date: Thu, 12 May 2016 11:04:48 -0700 Subject: Allow customisation of OTP_GITHUB_URL --- kerl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kerl b/kerl index 0329f7d..fea9ae2 100755 --- a/kerl +++ b/kerl @@ -26,15 +26,18 @@ GREP_OPTIONS='' ERLANG_DOWNLOAD_URL="http://www.erlang.org/download" -OTP_GITHUB_URL="https://github.com/erlang/otp" # Default values +: ${OTP_GITHUB_URL:="https://github.com/erlang/otp"} : ${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 "$OTP_GITHUB_URL" ]; then + _OGU="$OTP_GITHUB_URL" +fi if [ -n "$KERL_CONFIGURE_OPTIONS" ]; then _KCO="$KERL_CONFIGURE_OPTIONS" fi @@ -62,6 +65,7 @@ fi if [ -n "$KERL_BUILD_DOCS" ]; then _KBD="$KERL_BUILD_DOCS" fi +OTP_GITHUB_URL= KERL_CONFIGURE_OPTIONS= KERL_CONFIGURE_APPLICATIONS= KERL_CONFIGURE_DISABLE_APPLICATIONS= @@ -78,6 +82,9 @@ mkdir -p "$KERL_BASE_DIR" || exit 1 # source the config file if available if [ -f "$KERL_CONFIG" ]; then . "$KERL_CONFIG"; fi +if [ -n "$_OGU" ]; then + OTP_GITHUB_URL="$_OGU" +fi if [ -n "$_KCO" ]; then KERL_CONFIGURE_OPTIONS="$_KCO" fi -- cgit v1.2.3