summaryrefslogtreecommitdiff
path: root/etc/osdetect
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-03-22 10:57:53 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-03-22 10:57:53 +0100
commit8a6d0b76391dbec475293833d09b398ddad84e9a (patch)
tree916b2d1273f5f480ba7708c1632f8b2b48566171 /etc/osdetect
parent3aa9e5592a0f44c05f60313fdca62328900f7ea5 (diff)
zshrc: Do nothing except including files
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
+}