* usr/lib/byobu/include/shutil, usr/lib/byobu/release:

- Wolfi doesn't really have versions, so just use the distro
    name rather than version id
This commit is contained in:
Dustin Kirkland 2023-11-28 20:33:18 -06:00
commit c3e907c5a1
3 changed files with 11 additions and 1 deletions

View file

@ -320,6 +320,10 @@ get_distro() {
Debian*)
[ -r /etc/lsb-release ] && distro=$(. /etc/lsb-release && [ -n "$GOOGLE_ID" ] && echo "gLinux" || echo "Debian")
;;
*)
# assume first field is what we want
distro="${issue%% *}";
;;
esac
elif [ -r "/etc/issue" ]; then
# lsb_release is *really* slow; try to use /etc/issue first

View file

@ -28,6 +28,9 @@ __release() {
if [ -n "$RELEASE" ]; then
# user defined
true
elif [ "$BYOBU_DISTRO" = "Wolfi" ]; then
# Wolfi, and perhaps other distroless distros don't really have release versions
RELEASE="Wolfi"
elif [ -r "/etc/os-release" ]; then
# lsb_release is *really* slow; try to use /etc/os-release
RELEASE=$(. /etc/os-release && echo "$VERSION_ID")