1 # Detect the type of system we're running on
3 # This makes it easy to adjust script locations and so forth to match
4 # your system's file placement and other quirks.
6 if [ -z "${OS}" ]; then
8 if [ -f '/etc/make.conf' ] || [ -f '/etc/portage/make.conf' ]; then
10 elif [ "${SHELL#*gentoo}" != "${SHELL}" ]; then # assumes 'gentoo' in prefix
11 export OS='Gentoo Prefix'
12 elif grep -i '^ID=.*arch' /etc/os-release > /dev/null 2>&1; then
14 elif grep -i debian /etc/issue > /dev/null 2>&1; then
16 elif grep -i ubuntu /etc/issue > /dev/null 2>&1; then
18 elif grep -i fedora /etc/issue > /dev/null 2>&1; then
20 elif grep -i sunos /etc/motd > /dev/null 2>&1; then
23 echo "unknown system. Adjust .bashrc.d/01detect_system or set OS by hand" >&2