summaryrefslogtreecommitdiffstats
path: root/man/check-os-release.sh
blob: 12f7ee12cc5cd7365ecb024c1af5b3f2e60ff147 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh -eu
# SPDX-License-Identifier: MIT-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