#!/bin/sh
if [ -r /etc/os-release ]; then
    . /etc/os-release
elif [ -r /etc/lsb-release ]; then
    . /etc/lsb-release
fi
: "${ID:=PaganOS}"
: "${PRETTY_NAME:=PaganOS Linux}"
: "${VERSION_ID:=rolling}"
: "${VERSION_CODENAME:=-}"
case "$1" in
    -a|--all)
        echo "Distributor ID: $ID"
        echo "Description:    $PRETTY_NAME"
        echo "Release:        $VERSION_ID"
        echo "Codename:       $VERSION_CODENAME" ;;
    -i|--id)              echo "$ID" ;;
    -d|--description)     echo "$PRETTY_NAME" ;;
    -r|--release)         echo "$VERSION_ID" ;;
    -c|--codename)        echo "$VERSION_CODENAME" ;;
    -s|--short)           echo "$PRETTY_NAME" ;;
    -h|--help)
        echo "Użycie: lsb_release [opcje]"
        echo "  -a  wszystkie informacje"
        exit 0 ;;
    *) echo "Użycie: lsb_release [opcje]"; exit 1 ;;
esac
