#!/bin/sh ostype='unknown' platform='unknown' unamestr=$(uname) if [ "$unamestr" = 'Linux' ]; then ostype='linux' platform=$(cat /etc/os-release | grep "^ID=" | sed -e "s/ID=//") elif [ "$unamestr" = 'FreeBSD' ]; then ostype='bsd' platform='freebsd' elif [ "$unamestr" = 'OpenBSD' ]; then ostype='bsd' platform='openbsd' fi