.bashrc.d/01detect_system: Use os-release to detect Arch
[dotfiles-public.git] / src / .bashrc.d / 01detect_system
index 7030a1b6316e9ee629ba52a17ea4e3bee9c8ea93..03d8f1745871f541a38facd23686807c97559903 100644 (file)
@@ -9,6 +9,8 @@ if [ -z "${OS}" ]; then
                export OS='Gentoo'
        elif [ "${SHELL#*gentoo}" != "${SHELL}" ]; then  # assumes 'gentoo' in prefix
                export OS='Gentoo Prefix'
+       elif grep -i '^ID=.*arch' /etc/os-release > /dev/null 2>&1; then
+               export OS='Arch'
        elif grep -i debian /etc/issue > /dev/null 2>&1; then
                export OS='Debian'
        elif grep -i ubuntu /etc/issue > /dev/null 2>&1; then