Update 2 files

- /home/.chezmoiscripts/universal/run_onchange_after_40-chrome.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_40-firefox.tmpl
This commit is contained in:
Brian Zalewski 2023-02-01 20:39:10 +00:00
parent 2a13a939ac
commit 6a10354760
2 changed files with 3 additions and 3 deletions

View file

@ -43,7 +43,7 @@ for EXTENSION_DIR in "/opt/google/chrome/extensions" "/etc/chromium/extensions"
### Add extension JSON
logg info "Adding Chrome extensions to $EXTENSION_DIR"
for EXTENSION in {{ list (.chromeExtensions | toString | replace "[" "" | replace "]" "") | uniq | join " " }}; do
logg info "Adding Chrome extension ($EXTENSION)"
logg info "Adding Chrome extension manifest ($EXTENSION)"
EXTENSION_ID="$(echo "$EXTENSION" | sed 's/^.*\/\([^\/]*\)$/\1/')"
if [[ "$EXTENSION_DIR" == '/opt/'* ]] || [[ "$EXTENSION_DIR" == '/etc/'* ]]; then
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/chrome/extension.json" "$EXTENSION_DIR/${EXTENSION_ID}.json"

View file

@ -209,7 +209,7 @@ for SETTINGS_DIR in "$HOME/snap/firefox/common/.mozilla/firefox" "$HOME/.var/app
### Install Firefox addons (using list declared in .chezmoidata.yaml)
for FIREFOX_PLUGIN in {{ list (.firefoxAddOns | toString | replace "[" "" | replace "]" "") | uniq | join " " }}; do
logg info 'Ensuring `'"$FIREFOX_PLUGIN"'` is installed'
logg info "Processing the $FIREFOX_PLUGIN Firefox add-on"
PLUGIN_HTML="$(mktemp)"
curl --silent "https://addons.mozilla.org/en-US/firefox/addon/$FIREFOX_PLUGIN/" > "$PLUGIN_HTML"
PLUGIN_TMP="$(mktemp)"
@ -222,7 +222,7 @@ for SETTINGS_DIR in "$HOME/snap/firefox/common/.mozilla/firefox" "$HOME/.var/app
PLUGIN_FILENAME="${PLUGIN_FILE_ID}.xpi"
PLUGIN_FOLDER="$(echo "$PLUGIN_FILENAME" | sed 's/.xpi$//')"
if [ ! -d "$SETTINGS_DIR/profile.plugins/extensions/$PLUGIN_FOLDER" ]; then
logg info 'Downloading plugin file for '"$PLUGIN_FILENAME"' ('"$FIREFOX_PLUGIN"')'
logg info 'Downloading add-on XPI file for '"$PLUGIN_FILENAME"' ('"$FIREFOX_PLUGIN"')'
if [ ! -d "$SETTINGS_DIR/profile.plugins/extensions" ]; then
mkdir -p "$SETTINGS_DIR/profile.plugins/extensions"
fi