From d167fc9b40a83187c657f3a048f19ac56f529af3 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 28 Jan 2021 15:52:17 +0100 Subject: Better main(). * More than one input database. * Only creating templating engine if the rules require it. --- engine | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'engine') diff --git a/engine b/engine index 4444143..8fb2b33 100755 --- a/engine +++ b/engine @@ -5,7 +5,17 @@ set -euo pipefail basedir="$(dirname $0)" jar="$(echo $basedir/module/ri-engine/target/ri-engine-*-fat.jar)" +if [[ ! -r engine_completion ]] +then + echo "Generating completion script" + java --enable-preview \ + -cp "$jar" \ + picocli.AutoComplete \ + io.trygvis.rules.engine.Main +fi + exec java \ --enable-preview \ + --add-opens java.base/java.lang=ALL-UNNAMED \ -jar "$jar" \ "${@}" -- cgit v1.2.3