File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ RUN curl -s "https://get.sdkman.io" | bash
44RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && \
55 sdk install java 25-graalce"
66COPY scripts/setup_antlr.sh /tmp/setup_antlr.sh
7- RUN bash /tmp/setup_antlr.sh && rm /tmp/setup_antlr.sh
8- ENV ANTLR_JAR="lib/antlr-complete.jar"
7+ RUN bash /tmp/setup_antlr.sh ~/lib && rm /tmp/setup_antlr.sh
8+ ENV ANTLR_JAR="~/ lib/antlr-complete.jar"
99# protoc 29.5 is the last version with protobuf python v5 which is compatible with protoletariat v3
1010RUN cd ~ && curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v29.5/protoc-29.5-linux-x86_64.zip && \
1111 unzip protoc-29.5-linux-x86_64.zip -d ~/.local && \
Original file line number Diff line number Diff line change 11#! /bin/bash
22# Setup ANTLR for Substrait Python
3+ # Usage: setup_antlr.sh [ANTLR_JAR_DIR]
4+ # If ANTLR_JAR_DIR is not provided, defaults to project root/lib
35
46set -e
57
68ANTLR_VERSION=" 4.13.2"
7- # Get the project root (parent of scripts directory)
8- SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
9- PROJECT_ROOT=" $( dirname " ${SCRIPT_DIR} " ) "
10- ANTLR_JAR_DIR=" ${PROJECT_ROOT} /lib"
9+
10+ # Determine ANTLR_JAR_DIR
11+ if [ -n " $1 " ]; then
12+ # Use provided argument
13+ ANTLR_JAR_DIR=" $1 "
14+ else
15+ ANTLR_JAR_DIR=" lib"
16+ fi
17+
1118ANTLR_JAR=" ${ANTLR_JAR_DIR} /antlr-complete.jar"
1219ANTLR_URL=" https://www.antlr.org/download/antlr-${ANTLR_VERSION} -complete.jar"
1320VERSION_FILE=" ${ANTLR_JAR_DIR} /.antlr_version"
You can’t perform that action at this time.
0 commit comments