diff options
Diffstat (limited to 'bootstrap-nvim-dict.sh')
| -rwxr-xr-x | bootstrap-nvim-dict.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bootstrap-nvim-dict.sh b/bootstrap-nvim-dict.sh new file mode 100755 index 0000000..aae8f88 --- /dev/null +++ b/bootstrap-nvim-dict.sh | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | set -eu | ||
| 3 | |||
| 4 | SPELL_DIR="$HOME/.local/share/nvim/site/spell" | ||
| 5 | mkdir -p "$SPELL_DIR" | ||
| 6 | |||
| 7 | cd "$SPELL_DIR" | ||
| 8 | |||
| 9 | download() { | ||
| 10 | local url="$1" | ||
| 11 | local file | ||
| 12 | file=$(basename "$url") | ||
| 13 | |||
| 14 | if [ -f "$file" ]; then | ||
| 15 | echo "Skipping $file (already exists)" | ||
| 16 | return | ||
| 17 | fi | ||
| 18 | |||
| 19 | echo "Downloading $file..." | ||
| 20 | if command -v wget >/dev/null 2>&1; then | ||
| 21 | wget -q --show-progress "$url" | ||
| 22 | elif command -v curl >/dev/null 2>&1; then | ||
| 23 | curl -LO "$url" | ||
| 24 | else | ||
| 25 | echo "ERROR: neither wget nor curl found" | ||
| 26 | exit 1 | ||
| 27 | fi | ||
| 28 | } | ||
| 29 | |||
| 30 | # Deutsche Wörterbücher | ||
| 31 | download "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl" | ||
| 32 | download "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" | ||
| 33 | |||
| 34 | echo "Deutsche Wörterbücher für Neovim installiert!" | ||
