aboutsummaryrefslogtreecommitdiffstats
path: root/shlib/os.sh
blob: 1ac4f04626686351fb4d81aecac1b66d28a53931 (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_linux() {
  [ "$(os_print)" = "Linux" ]
}