aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Wayne Norton <[email protected]>2012-12-08 13:36:06 +0900
committerJoseph Wayne Norton <[email protected]>2012-12-08 13:56:00 +0900
commit83ca3eb4f121606c145e5b71af89eb46282e1e8b (patch)
tree156ed316ced0da80f7e182c5f3c6ac4db7377f2e
parent6cce35d35bed9f72ecfa00943253e05d5bc3d5b7 (diff)
downloadkerl-83ca3eb4f121606c145e5b71af89eb46282e1e8b.tar.gz
kerl-83ca3eb4f121606c145e5b71af89eb46282e1e8b.tar.bz2
kerl-83ca3eb4f121606c145e5b71af89eb46282e1e8b.zip
Use HREF url to extract list of releases from erlang.org
Kerl previously used the contents of the HTML <a> tag for this purpose. Unfortunately, the HTML <a> tag is not always rendered as expected. The old output from "kerl update releases": ------ Getting the available releases from erlang.org... The available releases are: R10B-0 R10B-2 R10B-3 R10B-4 R10B-5 R10B-6 R10B-7 R10B-8 R10B-9 R11B-0 R11B-1 R11B-2 R11B-3 R11B-4 R11B-5 R12B-0 R12B-1 R12B-2 R12B-3 R12B-4 R12B-5 R13A R13B R13B01 R13B02 R13B03 R13B04 R14A R14B R14B01 R14B02 R14B03 R14B04 R15B R15B01 R15B02 R15B03 ------ The new output from "kerl update releases": ------ Getting the available releases from erlang.org... The available releases are: R10B-0 R10B-10 R10B-2 R10B-3 R10B-4 R10B-5 R10B-6 R10B-7 R10B-8 R10B-9 R11B-0 R11B-1 R11B-2 R11B-3 R11B-4 R11B-5 R12B-0 R12B-1 R12B-2 R12B-3 R12B-4 R12B-5 R13A R13B R13B01 R13B02-1 R13B02 R13B03 R13B04 R14A R14B R14B01 R14B02 R14B03 R14B04 R15B R15B01 R15B02 R15B03-1 R15B03 ------
-rwxr-xr-xkerl2
1 files changed, 1 insertions, 1 deletions
diff --git a/kerl b/kerl
index 43220d6..d50f7c5 100755
--- a/kerl
+++ b/kerl
@@ -114,7 +114,7 @@ if [ $# -eq 0 ]; then usage; fi
get_releases()
{
curl -s $ERLANG_DOWNLOAD_URL/ | \
- sed $SED_OPT -e 's/^.*>otp_src_(R1[-1234567890ABCD]+)\.tar\.gz<.*$/\1/' \
+ sed $SED_OPT -e 's/^.*<[aA] [hH][rR][eE][fF]=\"\/download\/otp_src_(R1[-1234567890ABCD]+)\.tar\.gz\">.*$/\1/' \
-e '/^R/!d'
}