# Detect the type of system we're running on # # This makes it easy to adjust script locations and so forth to match # your system's file placement and other quirks. if test -z "${OS}"; then export OS='UNKNOWN' _OS="$(source /etc/os-release && echo "${ID}")" if test -n "_OS"; then export OS="${_OS}" elif grep -i sunos /etc/motd > /dev/null 2>&1; then export OS='SunOS' else echo "unknown system. Adjust .bashrc.d/01detect_system or set OS by hand" >&2 fi fi