16 lines
332 B
Bash
Executable File
16 lines
332 B
Bash
Executable File
#!/bin/bash
|
|
set -aeo pipefail
|
|
filename="$1"
|
|
url="$2"
|
|
tmpfile=$(mktemp /tmp/install_firefox_addon.XXXXXX)
|
|
|
|
readarray -t profiles <<<"$(sed -n 's/^Path=\(.*\)$/\1/p' $HOME/.mozilla/firefox/profiles.ini)"
|
|
|
|
|
|
|
|
curl -sLo "$tmpfile" "$url"
|
|
for p in "$profiles";do
|
|
cp "$tmpfile" "$HOME/.mozilla/firefox/$p/$filename"
|
|
done
|
|
rm "$tmpfile"
|