aboutsummaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2021-03-30 20:39:40 -0400
committertdro <tdro@users.noreply.github.com>2021-03-31 00:21:52 -0400
commit98203ff438bfbdf59c1314efa027d9fc6e3e2dea (patch)
tree72619dcfbfb104f6022326ce6972e0563ad75589 /.local
parent98a39bcedb1181392fa012cbae792780efea05bb (diff)
downloaddotfiles-98203ff438bfbdf59c1314efa027d9fc6e3e2dea.tar.gz
dotfiles-98203ff438bfbdf59c1314efa027d9fc6e3e2dea.tar.bz2
dotfiles-98203ff438bfbdf59c1314efa027d9fc6e3e2dea.zip
.config/nixpkgs: Download vale styles directly
Use subversion and remove nix environment dependency.
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/vale16
-rwxr-xr-x.local/bin/vale-wrapper2
2 files changed, 16 insertions, 2 deletions
diff --git a/.local/bin/vale b/.local/bin/vale
new file mode 100755
index 0000000..fb86fde
--- /dev/null
+++ b/.local/bin/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 -v "local/bin" | head -n 1) --config "$directory/vale.ini" "$@";
diff --git a/.local/bin/vale-wrapper b/.local/bin/vale-wrapper
deleted file mode 100755
index 5efabd4..0000000
--- a/.local/bin/vale-wrapper
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh -eu
-vale --config "$XDG_CONFIG_HOME/vale/vale.ini" "$@"