<commit_before>#!/bin/sh

#######################################################################################################################
#
#  Ontop Build Script
# 
#  <xiao(a)inf.unibz.it>
#
#######################################################################################################################


export VERSION=1.16
export REVISION=2-SNAPSHOT

# location for the build ROOT folder (i.e. the directory of this script)
export BUILD_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# location for the build dependencies home 
export ONTOP_DEP_HOME=${BUILD_ROOT}/ontop-build-dependencies


if [ -d "${ONTOP_DEP_HOME}" ] && [ -f "${ONTOP_DEP_HOME}/.git" ]
then
  echo ""
  echo "========================================="
  echo " Starting Ontop build script ... "
  echo "-----------------------------------------"
  echo ""
else
  echo "ERROR: git submodule 'ontop-build-dependencies' is missing or uninitiated!"
  echo "Please run 'git submodule init && git submodule update'"
  exit 0
fi

# location for protege clean folder
export PROTEGE_COPY_FILENAME=protege-5.0.0-beta-21-platform-independent
export PROTEGE_MAIN_FOLDER_NAME=Protege-5.0.0-beta-21
export PROTEGE_MAIN_PLUGIN=ontop-protege-plugin

# location and name for jetty distribution (should be ZIP)
export JETTY_COPY_FILENAME=jetty-distribution-8.1.9
export JETTY_INNER_FOLDERNAME=jetty-distribution-8.1.9
<commit_msg>check java version in the build script<commit_after>#!/bin/sh

#######################################################################################################################
#
#  Ontop Build Script
# 
#  <xiao(a)inf.unibz.it>
#
#######################################################################################################################


export VERSION=1.16
export REVISION=2-SNAPSHOT

if type -p java; then
    echo Found java executable in PATH
    _java=java
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]];  then
    echo Found java executable in JAVA_HOME
    _java="$JAVA_HOME/bin/java"
else
    echo "ERROR: Java is not installed!"
    exit 1
fi

if [[ "$_java" ]]; then
    JAVA_VER=$(java -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\2/; 1q')
    #echo version "$version"
    if [[ "$JAVA_VER" -ne "8" ]]; then
        echo "ERROR: Java 8 is required for building Ontop! Current Java version: $JAVA_VER"
        exit 1
    fi
fi


# location for the build ROOT folder (i.e. the directory of this script)
export BUILD_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# location for the build dependencies home 
export ONTOP_DEP_HOME=${BUILD_ROOT}/ontop-build-dependencies


if [ -d "${ONTOP_DEP_HOME}" ] && [ -f "${ONTOP_DEP_HOME}/.git" ]
then
  echo ""
  echo "========================================="
  echo " Starting Ontop build script ... "
  echo "-----------------------------------------"
  echo ""
else
  echo "ERROR: git submodule 'ontop-build-dependencies' is missing or uninitiated!"
  echo "Please run 'git submodule init && git submodule update'"
  exit 1
fi

# location for protege clean folder
export PROTEGE_COPY_FILENAME=protege-5.0.0-beta-21-platform-independent
export PROTEGE_MAIN_FOLDER_NAME=Protege-5.0.0-beta-21
export PROTEGE_MAIN_PLUGIN=ontop-protege-plugin

# location and name for jetty distribution (should be ZIP)
export JETTY_COPY_FILENAME=jetty-distribution-8.1.9
export JETTY_INNER_FOLDERNAME=jetty-distribution-8.1.9

{'fraction_non_alphanumeric': 0.29279673374161563, 'fraction_numerical': 0.01516477107028288, 'mean_word_length': 4.326086956521739, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3168278', 'n_tokens_mistral': 1115, 'n_tokens_neox': 1042, 'n_words': 269}