feat(validator): Initial commit

This commit is contained in:
hygienic-books 2023-06-23 17:38:06 +02:00
parent 960795c8a4
commit 0890d72ad8
2 changed files with 27 additions and 1 deletions

View File

@ -1,3 +1,25 @@
# erlang-terms-validate # erlang-terms-validate
A helper script to syntactically validate an Erlang terms config file A helper script to syntactically validate an Erlang terms config file
# Setup
Get started like so:
1. Clone repo into arbitrary path `<repo>`
1. Make `erlang-terms-validate.escript` executable
```
chmod +x <repo>/erlang-terms-validate.escript
```
1. Symlink to file, for example
```
sudo ln -s <repo>/erlang-terms-validate.escript /usr/local/bin/erlang-terms-validate
```
# Credits
[Stack Overflow user Jesse Gumm](https://stackoverflow.com/users/318025/chops) aka `chops` in November 2012 post [stackoverflow.com/a/13424207](https://stackoverflow.com/a/13424207)

View File

@ -0,0 +1,4 @@
#!/usr/bin/env escript
main([ConfigFile]) ->
{ok, Terms} = file:consult(ConfigFile),
io:format("~p~n",[Terms]).