feat(validator): Initial commit
This commit is contained in:
parent
960795c8a4
commit
0890d72ad8
22
README.md
22
README.md
@ -1,3 +1,25 @@
|
||||
# erlang-terms-validate
|
||||
|
||||
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)
|
||||
|
4
erlang-terms-validate.escript
Normal file
4
erlang-terms-validate.escript
Normal file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env escript
|
||||
main([ConfigFile]) ->
|
||||
{ok, Terms} = file:consult(ConfigFile),
|
||||
io:format("~p~n",[Terms]).
|
Loading…
x
Reference in New Issue
Block a user