aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap/neovim-dict.sh31
-rwxr-xr-xbootstrap/neovim.sh2
2 files changed, 22 insertions, 11 deletions
diff --git a/bootstrap/neovim-dict.sh b/bootstrap/neovim-dict.sh
index fa29728..77a7db8 100755
--- a/bootstrap/neovim-dict.sh
+++ b/bootstrap/neovim-dict.sh
@@ -6,28 +6,39 @@ mkdir -p "$SPELL_DIR"
6 6
7cd "$SPELL_DIR" 7cd "$SPELL_DIR"
8 8
9die() {
10 printf 'Fehler: %s\n' "$*" >&2
11 exit 1
12}
13
14have() {
15 command -v "$1" >/dev/null 2>&1
16}
17
9download() { 18download() {
10 url="$1" 19 url="$1"
11 file=$(basename "$url") 20 file=$(basename "$url")
12 21
13 if [ -f "$file" ]; then 22 if [ -f "$file" ]; then
14 echo "Skipping $file (already exists)" 23 printf "✓ %-32s vorhanden\n" "$file"
15 return 24 return
16 fi 25 fi
17 26
18 echo "Downloading $file..." 27 printf "→ Lade %s herunter\n" "$file"
19 if command -v wget >/dev/null 2>&1; then 28 if have wget; then
20 wget -q --show-progress "$url" 29 wget -q --show-progress "$url"
21 elif command -v curl >/dev/null 2>&1; then 30 elif have curl; then
22 curl -fLO "$url" 31 curl -fLO "$url"
23 else 32 else
24 echo "ERROR: neither wget nor curl found" 33 die "weder wget noch curl gefunden"
25 exit 1
26 fi 34 fi
27} 35}
28 36
29# Deutsche Wörterbücher 37main() {
30download "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl" 38 download "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl"
31download "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" 39 download "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug"
40
41 printf "\nWörterbücher für Neovim installiert!\n"
42}
32 43
33echo "Deutsche Wörterbücher für Neovim installiert!" 44main "$@"
diff --git a/bootstrap/neovim.sh b/bootstrap/neovim.sh
index 56a5247..d601dbd 100755
--- a/bootstrap/neovim.sh
+++ b/bootstrap/neovim.sh
@@ -5,7 +5,7 @@ set -eu
5OS="$(uname -s)" 5OS="$(uname -s)"
6 6
7die() { 7die() {
8 printf '%s\n' "$*" >&2 8 printf 'Fehler: %s\n' "$*" >&2
9 exit 1 9 exit 1
10} 10}
11 11