summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2021-01-28 15:52:17 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2021-01-28 15:52:17 +0100
commitd167fc9b40a83187c657f3a048f19ac56f529af3 (patch)
tree2a8fb8e64e3348a9e60727b5fc9d8cc3ec14faa7 /engine
parent0ae7ecd47fd76921e8e1137739497578fe703354 (diff)
downloadrules-sandbox-d167fc9b40a83187c657f3a048f19ac56f529af3.tar.gz
rules-sandbox-d167fc9b40a83187c657f3a048f19ac56f529af3.tar.bz2
rules-sandbox-d167fc9b40a83187c657f3a048f19ac56f529af3.tar.xz
rules-sandbox-d167fc9b40a83187c657f3a048f19ac56f529af3.zip
Better main().
* More than one input database. * Only creating templating engine if the rules require it.
Diffstat (limited to 'engine')
-rwxr-xr-xengine10
1 files changed, 10 insertions, 0 deletions
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" \
"${@}"