From de4ceadd9eb2a4b36125c4e74cb7e45fdbd03527 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 30 Jul 2024 00:52:55 +0200 Subject: [PATCH] Fix installation of brave extensions --- scripts/Common/Software/brave/main.fish | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/Common/Software/brave/main.fish b/scripts/Common/Software/brave/main.fish index c02b642b..feea2c09 100755 --- a/scripts/Common/Software/brave/main.fish +++ b/scripts/Common/Software/brave/main.fish @@ -17,12 +17,22 @@ begin if type -q "$bins[$i]" set bin "$bins[$i]" set extensionRoot "$extensionRoots[$i]" + break end end BROWSER_BIN="$bin" \ - EXTENSION_POLICY_DIR="$braveExtensions" \ + EXTENSION_POLICY_DIR="$extensionRoot" \ bash "$dir/../Chromium/ytmdl.sh" + + for i in (seq (count $bins)) + if [ "$extensionRoots[$i]" != "$extensionRoot" ] + if [ -d "$extensionRoots[$i]" ] + sudo rm -rf "$extensionRoots[$i]" + sudo ln -s "$extensionRoot" "$extensionRoots[$i]" + end + end + end end runInstaller $argv