From 9f9dd4b6e30542499b931c962e162c6ef0765578 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 1 May 2025 21:22:08 +1200 Subject: [PATCH] Magic! --- templates/dropshell-agent/install.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/templates/dropshell-agent/install.sh b/templates/dropshell-agent/install.sh index 2c3c368..624c61f 100644 --- a/templates/dropshell-agent/install.sh +++ b/templates/dropshell-agent/install.sh @@ -26,14 +26,9 @@ attempt_install_prerequisite() { # separate install for each prerequisite case "${prerequisite}" in - "bash") - $SUDO_CMD apt-get install -y bash - ;; - "curl") - $SUDO_CMD apt-get install -y curl - ;; - "wget") - $SUDO_CMD apt-get install -y wget + bash|curl|wget) + $SUDO_CMD apt-get update + $SUDO_CMD apt-get install -y wget curl bash ;; "docker") # install docker using the official script. @@ -47,8 +42,11 @@ attempt_install_prerequisite() { echo "Please install it manually and try again." echo "--------------------------------" exit 1 - } -install_prerequisites() {] + esac +} + + +install_prerequisites() { # this script works on debian, ubuntu and Raspberry Pi OS # it checks the following prerequisites, and installs them if missing. # if the user is root it proceeds, otherwise it checks for sudo privileges.