summaryrefslogtreecommitdiffstats
path: root/.local/bin/tmp_os.sh
diff options
context:
space:
mode:
authorJoe <rrbo@proton.me>2023-02-06 15:24:19 +0100
committerJoe <rrbo@proton.me>2023-02-06 15:24:19 +0100
commit226d9359878469f81c635de525e5d8722bb16e0e (patch)
treef8208f4ec8776b3b6fc843958f68153b137880a6 /.local/bin/tmp_os.sh
parentup (diff)
downloaddotfiles-bsd-226d9359878469f81c635de525e5d8722bb16e0e.tar.gz
dotfiles-bsd-226d9359878469f81c635de525e5d8722bb16e0e.tar.bz2
dotfiles-bsd-226d9359878469f81c635de525e5d8722bb16e0e.tar.xz
dotfiles-bsd-226d9359878469f81c635de525e5d8722bb16e0e.tar.zst
dotfiles-bsd-226d9359878469f81c635de525e5d8722bb16e0e.zip
up
Diffstat (limited to '.local/bin/tmp_os.sh')
-rwxr-xr-x.local/bin/tmp_os.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/.local/bin/tmp_os.sh b/.local/bin/tmp_os.sh
new file mode 100755
index 0000000..e0fa13f
--- /dev/null
+++ b/.local/bin/tmp_os.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+os="$(uname)"
+
+if [ "$os" = "Linux" ]; then
+ grep "Artix" /etc/issue >/dev/null 2>&1 && os=1 || os=2
+elif [ "$os" = "FreeBSD" ]; then
+ os=3
+else
+ echo "unknown OS"
+ exit 1
+fi
+echo $os >$tmpfile