diff options
-rw-r--r-- | README.md | 8 | ||||
-rwxr-xr-x | kerl | 19 |
2 files changed, 18 insertions, 9 deletions
@@ -1,7 +1,7 @@ kerl [](https://travis-ci.org/kerl/kerl) [](https://circleci.com/gh/kerl/kerl) ==== -Easy building and installing of [Erlang/OTP](http://www.erlang.org) instances. +Easy building and installing of [Erlang/OTP](https://www.erlang.org) instances. Kerl aims to be shell agnostic and its only dependencies, excluding what's required to actually build Erlang/OTP, are `curl` and `git`. @@ -57,7 +57,7 @@ Kerl keeps tracks of the releases it downloads, builds and installs, allowing easy installations to new destinations (without complete rebuilding) and easy switches between Erlang/OTP installations. -By default, kerl downloads source tarballs from the [official Erlang website](http://www.erlang.org), but +By default, kerl downloads source tarballs from the [official Erlang website](https://www.erlang.org), but you can tell kerl to download tarballs of Erlang source code from the tags pushed to the [official source code](https://github.com/erlang/otp) by setting `KERL_BUILD_BACKEND=git` @@ -380,7 +380,7 @@ Glossary Here are the abstractions kerl is handling: -- **releases**: Erlang/OTP releases from [erlang.org](http://erlang.org) +- **releases**: Erlang/OTP releases from [erlang.org](https://erlang.org) - **builds**: the result of configuring and compiling releases or git repositories @@ -406,7 +406,7 @@ Creates a named build either from an official Erlang/OTP release or from a git r You can specify the configure options to use when building Erlang/OTP with the `KERL_CONFIGURE_OPTIONS` variable, either in your $HOME/.kerlrc file or prepending it to the command line. Full list of all options can be in -[Erlang documentation](http://erlang.org/doc/installation_guide/INSTALL.html#Advanced-configuration-and-build-of-ErlangOTP_Configuring). +[Erlang documentation](https://erlang.org/doc/installation_guide/INSTALL.html#Advanced-configuration-and-build-of-ErlangOTP_Configuring). $ KERL_CONFIGURE_OPTIONS=--enable-hipe kerl build 19.2 19.2-hipe @@ -27,7 +27,7 @@ unset ERL_TOP KERL_VERSION='1.8.2' DOCSH_GITHUB_URL='https://github.com/erszcz/docsh.git' -ERLANG_DOWNLOAD_URL='http://www.erlang.org/download' +ERLANG_DOWNLOAD_URL='https://www.erlang.org/download' KERL_CONFIG_STORAGE_FILENAME='.kerl_config' if [ -z "$HOME" ]; then @@ -211,10 +211,19 @@ get_git_releases() { } get_tarball_releases() { - curl -f -q -L -s $ERLANG_DOWNLOAD_URL/ | \ - sed $SED_OPT -e 's/^.*<[aA] [hH][rR][eE][fF]=\"otp_src_([-0-9A-Za-z_.]+)\.tar\.gz\">.*$/\1/' \ - -e '/^R1|^[0-9]/!d' | \ - sed -e 's/^R\(.*\)/\1:R\1/' | sed -e 's/^\([^\:]*\)$/\1-z:\1/' | sort | cut -d: -f2 + tmp="$(mktemp /tmp/kerl.XXXXXX)" + if [ 200 = "$(curl -qsL --output "$tmp" --write-out '%{http_code}' $ERLANG_DOWNLOAD_URL/)" ]; then + sed $SED_OPT \ + -e 's/^.*<[aA] [hH][rR][eE][fF]=\"otp_src_([-0-9A-Za-z_.]+)\.tar\.gz\">.*$/\1/' \ + -e '/^R1|^[0-9]/!d' "$tmp" \ + | sed -e 's/^R\(.*\)/\1:R\1/' \ + | sed -e 's/^\([^\:]*\)$/\1-z:\1/' \ + | sort | cut -d: -f2 + rm "$tmp" + return 0 + fi + rm "$tmp" + exit 1 } update_checksum_file() { |