From d9bb820ae95b6050e1bb948abb943ad9b3579fb1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 7 Oct 2022 08:19:45 -0400 Subject: [PATCH] Update haos-vm-v4.sh add "Latest" --- vm/haos-vm-v4.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vm/haos-vm-v4.sh b/vm/haos-vm-v4.sh index c164c30c..36ee3afa 100644 --- a/vm/haos-vm-v4.sh +++ b/vm/haos-vm-v4.sh @@ -5,6 +5,7 @@ NEXTID=$(pvesh get /cluster/nextid) STABLE=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/stable.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') BETA=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/beta.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') DEV=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/dev.json | grep "ova" | awk '{print substr($2, 2, length($2)-3) }') +LATEST=$(curl -s https://api.github.com/repos/home-assistant/operating-system/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') YW=`echo "\033[33m"` BL=`echo "\033[36m"` HA=`echo "\033[1;34m"` @@ -107,10 +108,11 @@ function default_settings() { echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { -BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ +BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 4 \ "$STABLE" "Stable" ON \ "$BETA" "Beta" OFF \ "$DEV" "Dev" OFF \ +"$LATEST" "Latest" OFF \ 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi