summaryrefslogtreecommitdiff
path: root/browsers/firefox/update-userchrome.sh
blob: dae5d971aea122cc88c3dddc823733cd771d0c9c (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh
set -eu
ACCENT="$(../getaccent 2>/dev/null || echo)"
[ -n "$ACCENT" ] || ACCENT="#000000"
PROFILE_DIR="${HOME}/.mozilla/firefox"
PROFILE="$(ls "$PROFILE_DIR" | grep default | head -n1 || true)"
[ -n "$PROFILE" ] || { echo "No Firefox profile found" >&2; exit 1; }
PROFILE="$PROFILE_DIR/$PROFILE"
mkdir -p "$PROFILE/chrome"
sed "s/ACCENT/$ACCENT/" userChrome.template.css > "$PROFILE/chrome/userChrome.css"