aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/firefox/install.sh
blob: 9d70feb4d275ad109c64b63cfe04745c8e87c248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

pkgname=firefox

if ! command -v "$pkgname" >/dev/null; then
	printf '%s: %s not found, skipping...\n' "$0" "$pkgname"
	exit 0
fi

printf "%s: Installing user.js\n" "$0"

profile=$(grep -Po -m1 'Default=\K.*' <~/.mozilla/firefox/profiles.ini)
if [ -d "$XDG_CONFIG_HOME"/firefox ]; then
	for item in "$XDG_CONFIG_HOME"/firefox/*; do
		if [ ! -L ~/.mozilla/firefox/"$profile"/"${item##*/}" ]; then
			ln -vst ~/.mozilla/firefox/"$profile" "$item"
		fi
	done
fi