diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-01 23:13:14 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-01 23:13:14 +0100 |
commit | 1911481101e15463c8aecbdc03a6ce5b63b0d68f (patch) | |
tree | 254e8fe5e8cffb0cee35f77e1b9bfaa071d16489 /src/main/resources/io/trygvis/rules/engine | |
parent | e4821f82249bddb443a1f6a6e403087cab659c6d (diff) | |
download | rules-sandbox-1911481101e15463c8aecbdc03a6ce5b63b0d68f.tar.gz rules-sandbox-1911481101e15463c8aecbdc03a6ce5b63b0d68f.tar.bz2 rules-sandbox-1911481101e15463c8aecbdc03a6ce5b63b0d68f.tar.xz rules-sandbox-1911481101e15463c8aecbdc03a6ce5b63b0d68f.zip |
Generating DNS too.
Diffstat (limited to 'src/main/resources/io/trygvis/rules/engine')
-rw-r--r-- | src/main/resources/io/trygvis/rules/engine/default.drl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/resources/io/trygvis/rules/engine/default.drl b/src/main/resources/io/trygvis/rules/engine/default.drl new file mode 100644 index 0000000..090fddf --- /dev/null +++ b/src/main/resources/io/trygvis/rules/engine/default.drl @@ -0,0 +1,15 @@ +package io.trygvis.rules.engine; +import java.util.Map +import org.apache.commons.io.FileSystem +import org.apache.commons.io.FileUtils +import java.io.File + +rule "Clean directories" + agenda-group "init" +when + not(KeyValue(key == "rm-gen")); +then + System.out.println("Cleaning gen!"); + FileUtils.deleteDirectory(new File("gen")); + insert(new KeyValue("rm-gen", null)); +end |