diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-11-01 21:25:17 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-11-01 21:25:17 -0400 |
| commit | fe351483777c8d053d9f8b584278a4c2b162db0e (patch) | |
| tree | 15af9419e315bfad090c940be4a61625bf785876 /shlib/os.sh | |
| parent | Move /usr/local/bin farther up the path (diff) | |
| download | dotfiles-fe351483777c8d053d9f8b584278a4c2b162db0e.zip | |
Update install scripts for macos and linux and use sh
Diffstat (limited to 'shlib/os.sh')
| -rw-r--r-- | shlib/os.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/shlib/os.sh b/shlib/os.sh new file mode 100644 index 0000000..1ac4f04 --- /dev/null +++ b/shlib/os.sh @@ -0,0 +1,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" ] +} |