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:
parent
2a13a939ac
commit
6a10354760
2 changed files with 3 additions and 3 deletions
|
@ -43,7 +43,7 @@ for EXTENSION_DIR in "/opt/google/chrome/extensions" "/etc/chromium/extensions"
|
||||||
### Add extension JSON
|
### Add extension JSON
|
||||||
logg info "Adding Chrome extensions to $EXTENSION_DIR"
|
logg info "Adding Chrome extensions to $EXTENSION_DIR"
|
||||||
for EXTENSION in {{ list (.chromeExtensions | toString | replace "[" "" | replace "]" "") | uniq | join " " }}; do
|
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/')"
|
EXTENSION_ID="$(echo "$EXTENSION" | sed 's/^.*\/\([^\/]*\)$/\1/')"
|
||||||
if [[ "$EXTENSION_DIR" == '/opt/'* ]] || [[ "$EXTENSION_DIR" == '/etc/'* ]]; then
|
if [[ "$EXTENSION_DIR" == '/opt/'* ]] || [[ "$EXTENSION_DIR" == '/etc/'* ]]; then
|
||||||
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/chrome/extension.json" "$EXTENSION_DIR/${EXTENSION_ID}.json"
|
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/chrome/extension.json" "$EXTENSION_DIR/${EXTENSION_ID}.json"
|
||||||
|
|
|
@ -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)
|
### Install Firefox addons (using list declared in .chezmoidata.yaml)
|
||||||
for FIREFOX_PLUGIN in {{ list (.firefoxAddOns | toString | replace "[" "" | replace "]" "") | uniq | join " " }}; do
|
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)"
|
PLUGIN_HTML="$(mktemp)"
|
||||||
curl --silent "https://addons.mozilla.org/en-US/firefox/addon/$FIREFOX_PLUGIN/" > "$PLUGIN_HTML"
|
curl --silent "https://addons.mozilla.org/en-US/firefox/addon/$FIREFOX_PLUGIN/" > "$PLUGIN_HTML"
|
||||||
PLUGIN_TMP="$(mktemp)"
|
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_FILENAME="${PLUGIN_FILE_ID}.xpi"
|
||||||
PLUGIN_FOLDER="$(echo "$PLUGIN_FILENAME" | sed 's/.xpi$//')"
|
PLUGIN_FOLDER="$(echo "$PLUGIN_FILENAME" | sed 's/.xpi$//')"
|
||||||
if [ ! -d "$SETTINGS_DIR/profile.plugins/extensions/$PLUGIN_FOLDER" ]; then
|
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
|
if [ ! -d "$SETTINGS_DIR/profile.plugins/extensions" ]; then
|
||||||
mkdir -p "$SETTINGS_DIR/profile.plugins/extensions"
|
mkdir -p "$SETTINGS_DIR/profile.plugins/extensions"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue