aboutsummaryrefslogtreecommitdiffstats
path: root/kerl
diff options
context:
space:
mode:
Diffstat (limited to 'kerl')
-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}..."