summaryrefslogtreecommitdiffstats
path: root/man/check-os-release.sh
blob: 35c8cac4bdd6e56e161600f16dfeab0aef36a7c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh -eu
# SPDX-License-Identifier: CC0-1.0

test -e /etc/os-release && os_release='/etc/os-release' || os_release='/usr/lib/os-release'
. "${os_release}"

echo "Running on ${PRETTY_NAME:-Linux}"

if [ "${ID:-linux}" = "debian" ] || [ "${ID_LIKE#*debian*}" != "${ID_LIKE}" ]; then
    echo "Looks like Debian!"
fi