created script for adding firefox addons

This commit is contained in:
Jonas Forsberg
2020-08-02 18:08:29 +02:00
parent afbb5ccfd1
commit 30e0f7d5f5
2 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
#!/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
cp "$tmpfile" "$HOME/.mozilla/firefox/$p/$filename"
done
rm "$tmpfile"