This commit is contained in:
Mike McFetridge
2026-07-20 09:23:17 -04:00
parent c1315882da
commit 72272e4006
3179 changed files with 562960 additions and 14 deletions
+29
View File
@@ -0,0 +1,29 @@
---
tags:
- Scirpts
- Desktop
---
```
#!/bin/bash
set -euo pipefail
fonts_dir="$HOME/.local/share/fonts"
if [[ ! -d "$fonts_dir" ]]; then
mkdir -p "$fonts_dir"
fi
for font in "$@"; do
zip_file="$font.zip"
download_url="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/$zip_file"
echo "Downloading $download_url"
wget -O "/tmp/$zip_file" "$download_url"
unzip "/tmp/$zip_file" -d "/tmp/$font/"
mv /tmp/$font/*.ttf $fonts_dir
rm "/tmp/$zip_file"
rm "/tmp/$font/" -rf
done
fc-cache -fv
```