PortValhalla/scripts/Common/Software/brave/main.fish

38 lines
1,015 B
Fish
Raw Normal View History

#!/bin/env fish
begin
set -l dir (status dirname)
2024-11-01 12:12:16 +00:00
source "$dir/../../../lib/software.fish"
2024-07-17 14:04:57 +00:00
function configureSW -V dir
set -l bin
set -l extensionRoot
set -l bins brave brave-beta brave-nightly
set -l \
extensionRoots \
/opt/brave-bin/extensions \
/opt/brave.com/brave-{beta,nightly}/extensions
for i in (seq (count $bins))
if type -q "$bins[$i]"
set bin "$bins[$i]"
set extensionRoot "$extensionRoots[$i]"
2024-07-29 22:52:55 +00:00
break
end
end
2024-10-13 13:35:24 +00:00
fish "$dir/../chromium/ytmdl.fish" "$bin" "$extensionRoot"
2024-07-29 22:52:55 +00:00
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
end