aboutsummaryrefslogtreecommitdiffstats
path: root/shlib/os.sh
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2025-11-01 21:25:17 -0400
committerEugene Triguba <hello@eugenetriguba.com>2025-11-01 21:25:17 -0400
commitfe351483777c8d053d9f8b584278a4c2b162db0e (patch)
tree15af9419e315bfad090c940be4a61625bf785876 /shlib/os.sh
parentMove /usr/local/bin farther up the path (diff)
downloaddotfiles-fe351483777c8d053d9f8b584278a4c2b162db0e.zip
Update install scripts for macos and linux and use sh
Diffstat (limited to 'shlib/os.sh')
-rw-r--r--shlib/os.sh15
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" ]
+}