dots


xxwhirlpool  ·  2026-05-14

dots_gotm_site.sh

 1#!/usr/bin/env bash
 2
 3dots_home="/home/kat/dotfiles"
 4orange_var="ef9f76"
 5pink_var="f08eca"
 6
 7if [[ ! "$(command -v pgit)" ]]; then
 8	echo "missing required dependency: pgit"
 9	exit 1
10fi
11
12build_site() {
13	# build
14	pgit --revs main --repo "/home/kat/dotfiles" --label dots --out ./public --theme catppuccin-frappe
15	# replace orange with pink
16	sed -i "s/$orange_var/$pink_var/g" "./public/vars.css"
17}
18
19sync_site() {
20	# deploy to pgs.sh
21	rsync --delete -rv ./public/ pgs.sh:/dots
22	# delete public/ folder in dotfiles dir
23	rm -rf /home/kat/dotfiles/public/
24}
25
26case "$1" in
27	"") cd "$dots_home" && build_site && sync_site;;
28esac