From b08107c3e9ddc16f1e4b0bd9cfd2c126f42f806f Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 30 Nov 2011 16:04:16 -0500 Subject: [PATCH] Oops, grep returns 0 when it finds a match. Update .bashrc.d/01detect_system accordingly. --- src/.bashrc.d/01detect_system | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/.bashrc.d/01detect_system b/src/.bashrc.d/01detect_system index bce8321..df8b7f3 100644 --- a/src/.bashrc.d/01detect_system +++ b/src/.bashrc.d/01detect_system @@ -9,9 +9,9 @@ if [ -z "${OS}" ]; then export OS='Gentoo' elif [ "${SHELL#*gentoo}" != "${SHELL}" ]; then # assumes 'gentoo' in prefix export OS='Gentoo Prefix' - elif ! grep -i debian /etc/issue; then + elif grep -i debian /etc/issue > /dev/null 2>&1; then export OS='Debian' - elif ! grep -i ubuntu /etc/issue; then + elif grep -i ubuntu /etc/issue > /dev/null 2>&1; then export OS='Ubuntu' else echo "unknown system. Adjust .bashrc.d/01detect_system or set OS by hand" >&2 -- 2.26.2