From e12173571884560d3e5e3adc88bdcccf34e2fe1d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Mar 2022 17:14:28 -0400 Subject: [PATCH] Update homeassistant-install.sh --- setup/homeassistant-install.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index 45b25e4b..167fd6a0 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -21,13 +21,6 @@ function msg() { local TEXT="$1" echo -e "$TEXT" } -get_latest_release() { - curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 -} - -DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") -CORE_LATEST_VERSION=$(get_latest_release "home-assistant/core") -PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") CROSS='\033[1;31m\xE2\x9D\x8C\033[0m' RD=`echo "\033[01;31m"` @@ -70,6 +63,14 @@ echo -en "${GN} Installing pip3... " apt-get install -y python3-pip &>/dev/null echo -e "${CM}${CL} \r" +get_latest_release() { + curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 +} + +DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby") +CORE_LATEST_VERSION=$(get_latest_release "home-assistant/core") +PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") + echo -en "${GN} Installing Docker $DOCKER_LATEST_VERSION... " DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH)