zulip/scripts/lib/supported-os
Anders Kaseorg 34ed22a117 install: Support Ubuntu 26.04.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-04-22 22:00:04 -07:00

26 lines
549 B
Bash
Executable File

#!/usr/bin/env bash
#
# This script serves only to verify that the OS is a supported
# version, before we attempt to rely on that version in
# upgrade-zulip-stage-3
if [ -f /etc/os-release ]; then
os_info="$(
. /etc/os-release
printf '%s\n' "$ID" "$VERSION_ID"
)"
{
read -r os_id
read -r os_version_id
} <<<"$os_info"
fi
case "$os_id $os_version_id" in
'debian 12' | 'debian 13' | 'ubuntu 22.04' | 'ubuntu 24.04' | 'ubuntu 26.04')
exit 0
;;
*)
exit 1
;;
esac