From 5ad3657b328ccbbd4df91958a34fcb6b544957c4 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 20 Sep 2024 01:39:52 +0200 Subject: [PATCH] Install `bt-dualboot` for dualboot systems --- scripts/Arch/Scripts/deploy.fish | 6 +++++- scripts/Common/Scripts/config.fish | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/Arch/Scripts/deploy.fish b/scripts/Arch/Scripts/deploy.fish index b90b73a6..440dbf6c 100644 --- a/scripts/Arch/Scripts/deploy.fish +++ b/scripts/Arch/Scripts/deploy.fish @@ -14,10 +14,14 @@ function deploySoftware -d "Deploys a the specified software action" -a action end ) - if getConfig valhalla.linux.secureBoot --json | jq --exit-status > /dev/null + if isEnabled valhalla.linux.secureBoot source "$dir/../Config/SecureBoot/main.fish" $argv end + and if isEnabled valhalla.windows.dualboot.enable && $isInstall + yayinst bt-dualboot + end + and if collectionActive essential if $isInstall yayinst \ diff --git a/scripts/Common/Scripts/config.fish b/scripts/Common/Scripts/config.fish index 9f777c34..95802c10 100755 --- a/scripts/Common/Scripts/config.fish +++ b/scripts/Common/Scripts/config.fish @@ -25,6 +25,10 @@ function isSet -S -a property not test "$(getConfig "$property" --json)" = "null" end +function isEnabled -S -a property + getConfig "$property" --json | jq --exit-status > /dev/null +end + function collectionActive -S -a name [ "$(getConfig "valhalla.software.$name" --json)" = "true" ] end