comparison zshrc-linux-gnu @ 169:2cc8820caae0

extend the distribution detection mechanism
author Dirk Olmes <dirk.olmes@codedo.de>
date Sat, 04 Apr 2020 03:17:41 +0200
parents fa52868da3d4
children
comparison
equal deleted inserted replaced
168:75e3f2d8368c 169:2cc8820caae0
14 local linux_distro="unknown" 14 local linux_distro="unknown"
15 if [ -d /usr/portage ]; then 15 if [ -d /usr/portage ]; then
16 linux_distro="gentoo" 16 linux_distro="gentoo"
17 elif [ -f /etc/centos-release ]; then 17 elif [ -f /etc/centos-release ]; then
18 linux_distro="centos" 18 linux_distro="centos"
19 elif [ -d /etc/apt ]; then
20 linux_distro="debian"
19 fi 21 fi
20 22
21 # now source the distro zshrc file if it exists 23 # now source the distro zshrc file if it exists
22 local distro_zshrc=$HOME/.zsh-env/zshrc-${linux_distro} 24 local distro_zshrc=$HOME/.zsh-env/zshrc-${linux_distro}
23 if [ -r "${distro_zshrc}" ]; then 25 if [ -r "${distro_zshrc}" ]; then