From 5304d32083e4bb997733acc84a1cf7ee46ac5c52 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Wed, 1 Feb 2023 20:24:05 +0000 Subject: [PATCH] Update file run_onchange_after_40-chrome.tmpl --- .../universal/run_onchange_after_40-chrome.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/.chezmoiscripts/universal/run_onchange_after_40-chrome.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_40-chrome.tmpl index d0158458..54e050ea 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_40-chrome.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_40-chrome.tmpl @@ -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"