aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xkerl18
1 files changed, 15 insertions, 3 deletions
diff --git a/kerl b/kerl
index 0329f7d..403f797 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,10 @@ fi
if [ -n "$KERL_BUILD_DOCS" ]; then
_KBD="$KERL_BUILD_DOCS"
fi
+if [ -n "$KERL_BUILD_BACKEND" ]; then
+ _KBB="$KERL_BUILD_BACKEND"
+fi
+OTP_GITHUB_URL=
KERL_CONFIGURE_OPTIONS=
KERL_CONFIGURE_APPLICATIONS=
KERL_CONFIGURE_DISABLE_APPLICATIONS=
@@ -71,6 +78,7 @@ KERL_DEPLOY_RSYNC_OPTIONS=
KERL_INSTALL_MANPAGES=
KERL_BUILD_PLT=
KERL_BUILD_DOCS=
+KERL_BUILD_BACKEND=
# ensure the base dir exists
mkdir -p "$KERL_BASE_DIR" || exit 1
@@ -78,6 +86,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
@@ -105,6 +116,9 @@ fi
if [ -n "$_KBD" ]; then
KERL_BUILD_DOCS="$_KBD"
fi
+if [ -n "$_KBB" ]; then
+ KERL_BUILD_BACKEND="$_KBB"
+fi
if [ -z "$KERL_SASL_STARTUP" ]; then
INSTALL_OPT=-minimal
@@ -162,10 +176,8 @@ get_releases()
{
if [ "$KERL_BUILD_BACKEND" = "git" ]
then
- echo "Getting the available releases from github.com..."
get_git_releases
else
- echo "Getting the available releases from erlang.org..."
get_tarball_releases
fi
}