diff --git a/scripts/Common/Config/Chromium/install-extension.sh b/scripts/Common/Config/Chromium/install-extension.sh index f7ed8c12..c201ff58 100755 --- a/scripts/Common/Config/Chromium/install-extension.sh +++ b/scripts/Common/Config/Chromium/install-extension.sh @@ -20,6 +20,8 @@ else destination="$EXTENSION_DIR/$EXTENSION_NAME.crx"; + sudo -u "$1" brave-browser --pack-extension="$extensionDir" --pack-extension-key="$keyFile"; + # Tamper manifest file manifest="$(cat "$manifestFile" | jq ". + {key: "'"'"$(openssl rsa -in "$keyFile" -pubout -outform DER | openssl base64 -A)"'"'"}")"; echo "$manifest" | sudo -u "$1" tee "$manifestFile";