From: Thomas Walker Lynch Date: Thu, 12 Sep 2024 02:57:14 +0000 (+0000) Subject: removes bash scripts for tools install X-Git-Url: https://git.reasoningtechnology.com/usr/lib/python2.7/sre_compile.py?a=commitdiff_plain;h=8ffe895932b2e43ebe47b0e576bb16c8612f0402;p=GQL-to-Cypher removes bash scripts for tools install --- diff --git a/executor/install b/executor/install deleted file mode 100755 index 005f7c6..0000000 --- a/executor/install +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -# Check if REPO_HOME is set, if not exit with an error -if [ -z "$REPO_HOME" ]; then - echo "REPO_HOME is not set. Please initialize the environment." - exit 1 -fi - -# Call install scripts and handle errors -"$REPO_HOME/executor/install_Java" || { echo "Java installation failed."; } -"$REPO_HOME/executor/install_ANTLR" || { echo "ANTLR installation failed."; exit 1; } - -# Create symbolic link -ln -sfn "$REPO_HOME/tool/executor" "$REPO_HOME/tool/bin" - -echo "All installations complete. Java and ANTLR have been installed successfully." - -# https://gradle.org/install/ -# export PATH=$PATH:../gradle-8.10/bin -# -# gradle download: https://services.gradle.org/distributions/ -> tool/upstream -# cd tool -# unzip -d . upstream/gradle-8.10-rc-1-all.zip -# export PATH=$PATH:../gradle-8.10/bin -> env_dev diff --git a/executor/install_ANTLR b/executor/install_ANTLR deleted file mode 100755 index 59ca911..0000000 --- a/executor/install_ANTLR +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash -# -# GQL_to_Cypher/ -# ├── tool/ -# │ ├── executor/ -# │ │ └── antlr-4.11.1-complete.jar (copied from upstream) -# │ ├── jdk-22.0.1+8/ -# │ ├── upstream/ (cache of downloaded data) -# │ │ └── antlr-4.11.1-complete.jar -# │ └── .gitignore -# └── ... - - -# Check if REPO_HOME is set, if not exit with an error -if [ -z "$REPO_HOME" ]; then - echo "REPO_HOME is not set. Please initialize the environment." - exit 1 -fi - -# Define the version and URL for ANTLR, if you change the version be sure to update the URL -ANTLR_VERSION="4.11.1" -ANTLR_URL="https://www.antlr.org/download/antlr-4.11.1-complete.jar" - -# Create the upstream directory if it doesn't exist -mkdir -p "$REPO_HOME/tool/upstream" -mkdir -p "$REPO_HOME/tool/executor" - -# Download the ANTLR JAR file to the upstream directory -antlr_jar="$REPO_HOME/tool/upstream/antlr-$ANTLR_VERSION-complete.jar" -if [ ! -f "$antlr_jar" ]; then - echo "Downloading ANTLR..." - curl -L -o "$antlr_jar" "$ANTLR_URL" -fi - -if [ ! -s "$antlr_jar" ]; then - echo "ANTLR download failed. Exiting." - exit 1 -fi - -# Move the ANTLR JAR file to the executor directory -cp "$antlr_jar" "$REPO_HOME/tool/executor/" - -echo "ANTLR installation complete." diff --git a/executor/install_Java b/executor/install_Java deleted file mode 100755 index bc037fa..0000000 --- a/executor/install_Java +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash -# -# GQL_to_Cypher/ -# ├── tool/ -# │ ├── executor/ -# │ │ └── antlr-4.11.1-complete.jar -# │ ├── jdk-22.0.1+8/ -# │ │ ├── bin/ -# │ │ ├── conf/ -# │ │ ├── include/ -# │ │ ├── jmods/ -# │ │ ├── legal/ -# │ │ ├── lib/ -# │ │ ├── release -# │ │ └── ... -# │ ├── upstream/ -# │ │ ├── antlr-4.11.1-complete.jar -# │ │ └── jdk-22.0.1.tar.gz -# │ └── .gitignore -# └── ... - -# Check if REPO_HOME is set, if not exit with an error -if [ -z "$REPO_HOME" ]; then - echo "REPO_HOME is not set. Please initialize the environment." - exit 1 -fi - -# Define the version and URL for the JDK, if you change the version be sure to update the URL -JDK_VERSION="22.0.1" -JDK_URL="https://github.com/adoptium/temurin22-binaries/releases/download/jdk-22.0.1%2B8/OpenJDK22U-jdk_x64_linux_hotspot_22.0.1_8.tar.gz" - -# Create the upstream directory if it doesn't exist -mkdir -p "$REPO_HOME/tool/upstream" -mkdir -p "$REPO_HOME/tool" - -# Download the JDK to the upstream directory -jdk_tar="$REPO_HOME/tool/upstream/jdk-$JDK_VERSION.tar.gz" -if [ ! -f "$jdk_tar" ]; then - echo "Downloading JDK..." - curl -L -o "$jdk_tar" "$JDK_URL" -fi - -if [ ! -s "$jdk_tar" ]; then - echo "JDK download failed. Exiting." - exit 1 -fi - -echo "Extracting JDK..." -tar -xzf "$jdk_tar" -C "$REPO_HOME/tool" || { echo "JDK extraction failed. Exiting."; exit 1; } - -# Find the extracted JDK directory -jdk_dir=$(find "$REPO_HOME/tool" -maxdepth 1 -type d -name "jdk-*" | head -n 1) -if [ -z "$jdk_dir" ]; then - echo "JDK extraction failed. Exiting." - exit 1 -fi - -# Set JAVA_HOME and update PATH to use the local JDK -export JAVA_HOME="$jdk_dir" -export PATH="$JAVA_HOME/bin:$PATH" - -# Test Java installation -if ! java -version > /dev/null 2>&1; then - echo "Java version check failed." - exit 1 -fi - -echo "Java installation complete."