diff options
Diffstat (limited to '.local/bin/wrappers/vale')
-rwxr-xr-x | .local/bin/wrappers/vale | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.local/bin/wrappers/vale b/.local/bin/wrappers/vale new file mode 100755 index 0000000..f5863f2 --- /dev/null +++ b/.local/bin/wrappers/vale @@ -0,0 +1,16 @@ +#!/bin/sh -eu + +directory="$XDG_CONFIG_HOME/vale" +styles="$directory/styles" +mkdir -p "$directory" "$styles"; + +if [ "${1:-}" = "--update" ]; then + svn export --force https://github.com/errata-ai/Google/trunk/Google "$styles/google"; + svn export --force https://github.com/errata-ai/joblint/trunk/Joblint "$styles/joblint"; + svn export --force https://github.com/errata-ai/Microsoft/trunk/Microsoft "$styles/microsoft"; + svn export --force https://github.com/errata-ai/proselint/trunk/proselint "$styles/proselint"; + svn export --force https://github.com/errata-ai/write-good/trunk/write-good "$styles/write-good"; + exit; +fi + +$(which vale --all | grep --invert-match "local/bin" | head -n 1) --config "$directory/vale.ini" "$@"; |