#!/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"