aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Allen <[email protected]>2016-05-16 10:17:55 -0500
committerMark Allen <[email protected]>2016-05-16 10:17:55 -0500
commit22ff9b339aacab58ab354f7a97c93848f9262f3c (patch)
treee8a986731aafbd4eefa5608ec1be9cffbceade29
parent0e9a9999352fe655a9e56cf569fb132b9e73aa7d (diff)
downloadkerl-22ff9b339aacab58ab354f7a97c93848f9262f3c.tar.gz
kerl-22ff9b339aacab58ab354f7a97c93848f9262f3c.tar.bz2
kerl-22ff9b339aacab58ab354f7a97c93848f9262f3c.zip
Github tags before OTP 17 use underscore
-rwxr-xr-xkerl16
1 files changed, 13 insertions, 3 deletions
diff --git a/kerl b/kerl
index cd31b21..58cc66e 100755
--- a/kerl
+++ b/kerl
@@ -367,7 +367,7 @@ do_git_build()
get_otp_version()
{
- echo $1 | sed $SED_OPT -e 's/R?([0-9]{1,2})[.AB]?[0-9]*/\1/'
+ echo $1 | sed $SED_OPT -e 's/R?([0-9]{1,2})[.AB]?[0-9-]*/\1/'
}
show_logfile()
@@ -390,7 +390,7 @@ do_normal_build()
UNTARDIRNAME="$KERL_BUILD_DIR/$2/$FILENAME-kerluntar-$$"
rm -rf "$UNTARDIRNAME"
mkdir -p "$UNTARDIRNAME" || exit 1
- # github tarballs have a directory in the form of "otp-TAGNAME"
+ # github tarballs have a directory in the form of "otp[_-]TAGNAME"
# Ericsson tarballs have the classic otp_src_RELEASE pattern
# Standardize on Ericsson format because that's what the rest of the script expects
(cd "$UNTARDIRNAME" && tar xfz "$KERL_DOWNLOAD_DIR/$FILENAME.tar.gz" && mv ./* "$KERL_BUILD_DIR/$2/otp_src_$1")
@@ -962,11 +962,21 @@ do_active()
fi
}
+make_filename()
+{
+ release=$(get_otp_version "$1")
+ if [ $release -ge 17 ]; then
+ echo "OTP-$1"
+ else
+ echo "OTP_$1"
+ fi
+}
+
download()
{
mkdir -p "$KERL_DOWNLOAD_DIR" || exit 1
if [ "$KERL_BUILD_BACKEND" = "git" ]; then
- FILENAME="OTP-$1"
+ FILENAME=$(make_filename "$1")
github_download "$FILENAME.tar.gz"
else
FILENAME="otp_src_$1"