From 3cf230fd56e2fad33f5dd9877fc3d890572036e3 Mon Sep 17 00:00:00 2001 From: Luke Moch Date: Sat, 12 Jun 2021 04:40:15 +0000 Subject: [PATCH] Check and Install unzip --- install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install.sh b/install.sh index f267603..c837032 100644 --- a/install.sh +++ b/install.sh @@ -108,6 +108,15 @@ wget -q --show-progress $URL echo -en "\e[1A\e[0K" #Overwrite output from wget FILE=$(basename $URL) +# Check for and Install unzip (if needed) +if [[ $FILE == *.zip ]]; then + msg "Checking for unzip command" + if ! command -v unzip &> /dev/null; then + msg "unzip not found, installing..." + apt install unzip -y + fi +fi + # Extract Home Assistant disk image msg "Extracting disk image..." case $FILE in