Update file run_onchange_after_40-chrome.tmpl
This commit is contained in:
parent
3b87939a86
commit
5304d32083
1 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ for EXTENSION_DIR in "/opt/google/chrome/extensions" "/etc/chromium/extensions"
|
|||
### Ensure program-type is installed
|
||||
if [ -d "$(dirname "$EXTENSION_DIR")" ]; then
|
||||
### Ensure extension directory exists
|
||||
if [ "$EXTENSION_DIR" == '/opt/'* ] || [ "$EXTENSION_DIR" == '/etc/'* ]; then
|
||||
if [[ "$EXTENSION_DIR" == '/opt/'* ]] || [[ "$EXTENSION_DIR" == '/etc/'* ]]; then
|
||||
if [ ! -d "$EXTENSION_DIR" ]; then
|
||||
logg info "Creating directory $EXTENSION_DIR"
|
||||
sudo mkdir -p "$EXTENSION_DIR"
|
||||
|
@ -45,7 +45,7 @@ for EXTENSION_DIR in "/opt/google/chrome/extensions" "/etc/chromium/extensions"
|
|||
for EXTENSION in {{ list (.chromeExtensions | toString | replace "[" "" | replace "]" "") | uniq | join " " }}; do
|
||||
logg info "Adding Chrome extension ($EXTENSION)"
|
||||
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"
|
||||
else
|
||||
cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/chrome/extension.json" "$EXTENSION_DIR/${EXTENSION_ID}.json"
|
||||
|
|
Loading…
Reference in a new issue