From 1affcd4f06cbaa004c0557ace07a155faa81af20 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Tue, 6 Feb 2024 17:09:39 +0000 Subject: [PATCH] fix --- pi-image/update.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pi-image/update.sh b/pi-image/update.sh index 244e43f..1bfb379 100755 --- a/pi-image/update.sh +++ b/pi-image/update.sh @@ -23,6 +23,15 @@ fnm use --install-if-missing fnm default $(fnm current) corepack enable +# ensure some dependencies are installed +ensure_installed() { + if ! dpkg --verify "$1" 2>/dev/null; then + # Future: batch the installs, if there are multiple + apt-get install $1 + fi +} +ensure_installed "wget" + # Run interactive version picker yarn --cwd "pi-image/update-prompt" install node "pi-image/update-prompt/main.js" $1 $2