#!/bin/sh
# Copyright (C) 2024-2024 Kern Sibbald
# License: BSD 2-Clause; see file LICENSE-FOSS

# Small helper to get the OS details

if [ -f /etc/os-release ]; then
   . /etc/os-release
   if [ "$VERSION" = "" ]; then
      VERSION="$BUILD_ID"
   fi
   if [ "$PRETTY_NAME" = "" ]; then
      PRETTY_NAME="$NAME $VERSION"
   fi
   echo "$PRETTY_NAME"

elif [ -f /etc/lsb-release ]; then
      . /etc/lsb-release
      echo "$DISTRIB_ID $DISTRIB_RELEASE"
else
    exit 1
fi