2020-08-02 16:08:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -aeo pipefail
|
|
|
|
filename="$1"
|
|
|
|
url="$2"
|
|
|
|
tmpfile=$(mktemp /tmp/install_firefox_addon.XXXXXX)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
curl -sLo "$tmpfile" "$url"
|
|
|
|
for p in "$(sed -n 's/^Path=\(.*\)$/\1/p' $HOME/.mozilla/firefox/profiles.ini)";do
|
2020-08-02 16:18:40 +00:00
|
|
|
p=${p//[$'\t\r\n']}
|
2020-08-02 16:08:29 +00:00
|
|
|
cp "$tmpfile" "$HOME/.mozilla/firefox/$p/$filename"
|
|
|
|
done
|
|
|
|
rm "$tmpfile"
|