tried another way to check for gnu userland

main
The_miro 2025-04-03 10:56:03 +02:00
parent edfc052459
commit a28a0daffd
1 changed files with 9 additions and 2 deletions

11
.zshrc
View File

@ -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