aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Allen <[email protected]>2016-05-14 16:41:51 -0500
committerMark Allen <[email protected]>2016-05-14 16:41:51 -0500
commit0265f691151c5e44f5f0354f561a9acb6544eb87 (patch)
tree70bf08181cb2f1932eb59f276c1428c96e1b9271
parentfccafcd6a44b2495f3c30317b812d458a54a6294 (diff)
parent52c45f51fdce679d7658c52a7216cae2aaa11d77 (diff)
downloadkerl-0265f691151c5e44f5f0354f561a9acb6544eb87.tar.gz
kerl-0265f691151c5e44f5f0354f561a9acb6544eb87.tar.bz2
kerl-0265f691151c5e44f5f0354f561a9acb6544eb87.zip
Merge pull request #130 from kerl/mtc-custom-github-url1.0.1
Allow a custom Github URL
-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
}