themes.sh (1331B)
1 #!/bin/sh 2 # fluent gtk theme and icons (vinceliuice) into an image 3 # usage: themes.sh ROOT 4 set -eu 5 ROOT=${1:?usage: themes.sh ROOT} 6 GTK_TAG=2025-04-17 7 GTK_SHA256=bedc51e07ca4edaeb3bdd50e9e2a27c10f1b049f460b10e3b5668d11ff2b03cd 8 ICONS_TAG=2026-07-27 9 ICONS_SHA256=24a8aca29a5b652a0e60ff8e5f12b86fe4b9c4c969565fad7c3fa7c1742b3631 10 W=$(mktemp -d); trap 'rm -rf "$W"' EXIT 11 # downloads are kept here, so every edition's build doesn't fetch them from github again 12 SRC=${SRC_CACHE:-$HOME/.cache/chamesle-src} 13 fetch() { # REPO TAG SHA256 14 f=$SRC/$1-$2.tar.gz 15 if [ ! -f "$f" ]; then 16 mkdir -p "$SRC" 17 curl -fsSL --retry 5 --retry-all-errors -C - -o "$f.part" "https://github.com/vinceliuice/$1/archive/refs/tags/$2.tar.gz" 18 mv "$f.part" "$f" 19 fi 20 [ "$(sha256sum "$f" | cut -d' ' -f1)" = "$3" ] || { echo "themes: checksum mismatch for $1" >&2; rm -f "$f"; exit 1; } 21 tar -xzf "$f" -C "$W" 22 } 23 fetch Fluent-gtk-theme "$GTK_TAG" "$GTK_SHA256" 24 fetch Fluent-icon-theme "$ICONS_TAG" "$ICONS_SHA256" 25 mkdir -p "$ROOT/usr/share/themes" "$ROOT/usr/share/icons" 26 (cd "$W/Fluent-gtk-theme-$GTK_TAG" && bash install.sh -d "$ROOT/usr/share/themes" >/dev/null) 27 (cd "$W/Fluent-icon-theme-$ICONS_TAG" && bash install.sh -d "$ROOT/usr/share/icons" >/dev/null) 28 echo "themes: Fluent GTK/Xfwm4 themes and Fluent icons installed"