#!/bin/bash here="$(pwd)" if [[ ! "$here" =~ custom_firefox$ ]]; then printf 'I dunno where I am\n' >&2 exit 1 fi find "${HOME}/.mozilla/firefox" -maxdepth 1 -type d -name '*.default' \ | while read dir; do printf 'ln -fs "%s/userChrome.css" "%s"\n' "$here" "$dir" ln -fs "${here}/userChrome.css" "$dir" done