summaryrefslogtreecommitdiff
path: root/etc/osdetect
diff options
context:
space:
mode:
Diffstat (limited to 'etc/osdetect')
-rw-r--r--etc/osdetect11
1 files changed, 11 insertions, 0 deletions
diff --git a/etc/osdetect b/etc/osdetect
new file mode 100644
index 0000000..91a7c8a
--- /dev/null
+++ b/etc/osdetect
@@ -0,0 +1,11 @@
+## vim:ft=zsh
+# for system-specific setup
+system=${$(uname):l}
+alias 'linux:'='[[ $system == linux ]] &&'
+alias 'openbsd:'='[[ $system == openbsd ]] &&'
+if [[ $system == linux ]] {
+ [[ -f /etc/debian_version ]] && distro=debian
+ [[ -f /etc/gentoo-release ]] && distro=gentoo
+ [[ -f /etc/arch-release ]] && distro=arch
+ [[ -f /etc/redhat-release ]] && distro=redhat
+}