aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadek Szymczyszyn <[email protected]>2017-10-14 22:37:19 -0400
committerRadek Szymczyszyn <[email protected]>2017-11-03 17:46:43 +0100
commit238ceb2df1b16cc1c34237b64b9223bae99933a9 (patch)
treefd818771db82945f78359485c81511983fc0d58d
parent14f8e2cb95600a2e133897053d699f51112b9bbd (diff)
downloadkerl-238ceb2df1b16cc1c34237b64b9223bae99933a9.tar.gz
kerl-238ceb2df1b16cc1c34237b64b9223bae99933a9.tar.bz2
kerl-238ceb2df1b16cc1c34237b64b9223bae99933a9.zip
Check OTP / docsh version compatibility
-rwxr-xr-xkerl11
1 files changed, 9 insertions, 2 deletions
diff --git a/kerl b/kerl
index 7964756..07452ef 100755
--- a/kerl
+++ b/kerl
@@ -1105,8 +1105,6 @@ ACTIVATE_CSH
}
install_docsh() {
- # TODO: SHOULD check version compatibility
-
REPO_URL=$DOCSH_GITHUB_URL
GIT=$(echo -n $REPO_URL | $MD5SUM | cut -d ' ' -f $MD5SUM_FIELD)
BUILDNAME=$1
@@ -1114,6 +1112,15 @@ install_docsh() {
DOCSH_REF=kerl-install-docsh
ACTIVE_PATH=$2
+ OTP_VERSION=$(get_otp_version $1)
+ # This has to be updated with docsh updates
+ DOCSH_SUPPORTED="^1[89]$"
+ echo $OTP_VERSION | grep "$DOCSH_SUPPORTED" > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ echo "Erlang/OTP version $OTP_VERSION not supported by docsh (does not match regex $DOCSH_SUPPORTED)"
+ exit 1
+ fi
+
mkdir -p "$KERL_GIT_DIR" || exit 1
cd "$KERL_GIT_DIR" || exit 1
echo "Checking out docsh git repository from ${REPO_URL}..."