2020-08-02 16:08:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -aeo pipefail
|
|
|
|
|
2020-08-03 14:17:17 +00:00
|
|
|
{% for name, url in pillar['firefox']['addons'].items() %}
|
2020-08-03 08:19:23 +00:00
|
|
|
if [[ $(grep -oP '(?<=\},\"name\":\"){{ name }}' {{ salt['user.info']( pillar['username'] ).home }}/.mozilla/firefox/*.default*/addons.json) ]]; then
|
|
|
|
printf "{{ name }} is already installed\n"
|
|
|
|
else
|
|
|
|
printf "installing {{ name }}\n"
|
2020-08-03 14:17:17 +00:00
|
|
|
firefox {{ url }}
|
2020-08-03 08:19:23 +00:00
|
|
|
fi
|
|
|
|
{% endfor %}
|