From 759a23cb02c08932b7a6cd55056043d847a48822 Mon Sep 17 00:00:00 2001 From: Erlend Klakegg Bergheim Date: Sat, 8 Feb 2020 09:17:05 +0100 Subject: [PATCH] Minor update of Docker image. --- Dockerfile | 2 ++ README.md | 2 +- dist/bin/xsdchecker | 2 +- graal/run.sh | 23 +---------------------- 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 937d4cf..fd746d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,8 @@ RUN chmod a+x /files/bin/* # Final image FROM alpine:3.10 +ENV XSD_PATH=/schemas + COPY --from=tmp /files / VOLUME /src diff --git a/README.md b/README.md index cacaff1..d450678 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,5 @@ Supports XSD 1.0. with: script: | xc --xsd-1.0 **/*.xsd - xc --xslt2 **/*.xslt + xc --xslt-2.0 **/*.xslt ``` diff --git a/dist/bin/xsdchecker b/dist/bin/xsdchecker index 26798d8..4c6e2b4 100644 --- a/dist/bin/xsdchecker +++ b/dist/bin/xsdchecker @@ -2,7 +2,7 @@ PROJECT=$(dirname $(dirname "$0")) -export XSD_PATH=${PROJECT}/xsd +export XSD_PATH=${XSD_PATH:-${PROJECT}/xsd} if [ $JAVA_HOME ]; then $JAVA_HOME/bin/java -jar $PROJECT/lib/xsdchecker.jar $@ diff --git a/graal/run.sh b/graal/run.sh index e72fd71..e5a5d4c 100755 --- a/graal/run.sh +++ b/graal/run.sh @@ -4,28 +4,7 @@ set -e set -u if [ "${2:-}" ]; then - xsd=$1 - shift - - case $xsd in - "--maven") - xsd="/schemas/maven-4.0.0.xsd" - ;; - "--maven-4.0") - xsd="/schemas/maven-4.0.0.xsd" - ;; - "--xsd-1.0") - xsd="/schemas/xsd-1.0.xsd" - ;; - "--xslt2") - xsd="/schemas/xslt-2.0.xsd" - ;; - "--xslt-2.0") - xsd="/schemas/xslt-2.0.xsd" - ;; - esac - - xsdchecker $xsd ${@} + xsdchecker ${@} elif [ "${INPUT_SCRIPT:-}" ]; then # Trigger script. sh -ec "${INPUT_SCRIPT}"