aboutsummaryrefslogtreecommitdiffstats
path: root/shlib/os.sh
blob: 9c3b62cf2c542f20753936bcb56fab64b64cfcd8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# shellcheck shell=sh
[ -n "${DOTFILES_OS_LOADED}" ] && return
readonly DOTFILES_OS_LOADED=1

os_print() {
  uname
}

os_is_macos() {
  [ "$(os_print)" = "Darwin" ]
}

os_is_openbsd() {
  [ "$(os_print)" = "OpenBSD" ]
}