On Fri, Aug 6, 2021 at 2:40 PM Bertrand Delacretaz
<bdelacre...@apache.org> wrote:
> ...Jbang scripts [1] for example might be a nice way to do that...

I tried that [1] and that works well, at least if your goal is only to
check the syntax of repoinit scripts.

To run that script, use:

$ jbang trust add https://github.com/apache/sling-whiteboard/

$ cat > /tmp/xx <<EOF
create path /testing
create user leonardo
EOF

$ jbang 
https://github.com/apache/sling-whiteboard/blob/master/jbang/RepoinitValidator.java
< /tmp/xx
Repoinit parsing successful:
[CreatePath [testing], CreateUser leonardo]

The alias+catalog features of jbang [2] would allow for using a
simpler script name.

To go further and apply the repoinit operations to an actual
repository you'd need to pull in more bundles, I haven't tried if
that's practical or if you'd end up downloading half the Web.

-Bertrand

[1] 
https://github.com/apache/sling-whiteboard/blob/master/jbang/RepoinitValidator.java
[2] https://www.jbang.dev/documentation/guide/latest/alias_catalogs.html

Reply via email to