1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

tools: correctly detect and print FreeBSD OS

Currently the `print_toolchain_versions` script only supports Linux
and Apple macOS when printing OS name and version. This adds support
for FreeBSD.
This commit is contained in:
Sebastian Meiling 2019-12-18 10:25:26 +01:00
parent 4f4e7cde16
commit c185307025

View File

@ -44,6 +44,9 @@ get_os_info() {
elif [ "$os" = "Darwin" ]; then
osname="$(sw_vers -productName)"
osvers="$(sw_vers -productVersion)"
elif [ "$os" = "FreeBSD" ]; then
osname="$os"
osvers="$(freebsd-version)"
fi
printf "%s %s" "$osname" "$osvers"
}