From 65bc94933fb6a25be912ff040fe9f18aab31596e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 12 Jun 2022 15:30:10 -0300 Subject: Fix: check for package dependencies --- files/bootless | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/files/bootless b/files/bootless index a06c98d..0dffd6c 100755 --- a/files/bootless +++ b/files/bootless @@ -220,6 +220,15 @@ function bootless_check_dependencies { exit 1 fi done + + # Some package dependencies are needed, especially grub-pc-bin which + # enables PC BIOS-compatible images + for dependency in $DEPENDENCIES_DEB; do + if ! dpkg -l $dependency | grep -q "^ii "; then + echo "$NAME: unmet package dependency $dependency, please install it" + exit 1 + fi + done } # Load @@ -231,6 +240,7 @@ BOOTLESS_VERSION="0.0.1" BOOTLESS_ACTION="$1" BOOTLESS_DIR="$2" DEPENDENCIES="xorriso grub-mkrescue rsync dd" +DEPENDENCIES_DEB="grub-pc-bin" # Output name and version echo "$NAME $BOOTLESS_VERSION" -- cgit v1.2.3