summaryrefslogtreecommitdiffstats
path: root/.local/bin/tmp_os.sh
diff options
context:
space:
mode:
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