From e656831695334b3ecf669f14f2f277064ed4d37f Mon Sep 17 00:00:00 2001 From: Itiligent <94789708+itiligent@users.noreply.github.com> Date: Wed, 17 Jul 2024 00:18:18 +1000 Subject: [PATCH] unify OS detection with main install script --- upgrade-guac.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/upgrade-guac.sh b/upgrade-guac.sh index a2ff88b..321d629 100644 --- a/upgrade-guac.sh +++ b/upgrade-guac.sh @@ -78,12 +78,13 @@ MYSQL_ROOT_PWD= # Standardise on a distro version identification lexicon source /etc/os-release -OS_NAME=$ID -OS_VERSION=$VERSION_ID -OS_CODENAME=$VERSION_CODENAME +ID=$ID +VERSION_ID=$VERSION_ID +VERSION_CODENAME=$VERSION_CODENAME + # Workaround for issue #31 -if [[ "${OS_NAME,,}" = "debian" && "${OS_CODENAME,,}" = *"bullseye"* ]] || [[ "${OS_NAME,,}" = "ubuntu" && "${OS_CODENAME,,}" = *"focal"* ]]; then +if [[ "${ID,,}" = "debian" && "${VERSION_CODENAME,,}" = *"bullseye"* ]] || [[ "${ID,,}" = "ubuntu" && "${VERSION_CODENAME,,}" = *"focal"* ]]; then IFS='.' read -ra guac_version_parts <<< "${GUAC_VERSION}" major="${guac_version_parts[0]}" minor="${guac_version_parts[1]}"