feat: ✨ make efibootmgr and sbsign optional dependencies
This commit is contained in:
parent
c4dc5fdc0a
commit
16c3dc6b66
@ -7,10 +7,8 @@ end
|
|||||||
|
|
||||||
function check_deps -d "checks if all dependencies are available"
|
function check_deps -d "checks if all dependencies are available"
|
||||||
set -l dependencies \
|
set -l dependencies \
|
||||||
"efibootmgr" \
|
|
||||||
"jq" \
|
"jq" \
|
||||||
"rg" \
|
"rg" \
|
||||||
"sbsign" \
|
|
||||||
"sed" \
|
"sed" \
|
||||||
"snapper" \
|
"snapper" \
|
||||||
|
|
||||||
@ -21,6 +19,18 @@ function check_deps -d "checks if all dependencies are available"
|
|||||||
error "missing depenency: $dep"
|
error "missing depenency: $dep"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
which "efibootmgr" >/dev/null 2>/dev/null
|
||||||
|
if test $status != "0" -a $CFG_EFI = "yes"
|
||||||
|
set -g CFG_EFI "no"
|
||||||
|
echo "CFG_EFI overwriten to \"no\": 'efibootmgr' not available"
|
||||||
|
end
|
||||||
|
|
||||||
|
which "sbsign" >/dev/null 2>/dev/null
|
||||||
|
if test $status != "0" -a $CFG_EFI = "yes"
|
||||||
|
set -g CFG_SECUREBOOT "no"
|
||||||
|
echo "CFG_SECUREBOOT overwriten to \"no\": 'sbsign' not available"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function find_tasks -d "finds out what the program needs to do"
|
function find_tasks -d "finds out what the program needs to do"
|
||||||
@ -122,9 +132,9 @@ end
|
|||||||
|
|
||||||
function main
|
function main
|
||||||
# prepare for execution
|
# prepare for execution
|
||||||
check_deps
|
|
||||||
source "/etc/snap-pac-uki/config.fish"
|
source "/etc/snap-pac-uki/config.fish"
|
||||||
config
|
config
|
||||||
|
check_deps
|
||||||
|
|
||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
case "snapshots"
|
case "snapshots"
|
||||||
|
Loading…
Reference in New Issue
Block a user