From a28a0daffd4c41932b9991026d700f879b9cbadc Mon Sep 17 00:00:00 2001 From: The_miro Date: Thu, 3 Apr 2025 10:56:03 +0200 Subject: [PATCH] tried another way to check for gnu userland --- .zshrc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index fa5d6b7..e8dc8c0 100755 --- a/.zshrc +++ b/.zshrc @@ -1,5 +1,12 @@ -gnuloc=$(command -v gcc) -if [ "${gnuloc}" = "/usr/bin/gcc" ]; then +grep --help >/dev/null 2>&1 +RESULT=$? +IsGNU=null +if [ $RESULT -eq 0 ]; then + $IsGNU = true +else + $IsGNU = false +fi +if [ "${IsGNU}}" = "true" ]; then #source ~/.bash_profile # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH