diff --git a/bashrc b/bashrc index c78b506f..c4bf94d9 100644 --- a/bashrc +++ b/bashrc @@ -801,6 +801,21 @@ erase-mbr() { echo dd if=/dev/zero of=$1 bs=512 count=2 } +# Use clang if installed. It seems interesting and this is probably good +# way to test it. This might not be a function, but I don't have any better +# place for this. +if hash clang 2>/dev/null; then + export CC=clang +else + unset CC +fi + +if hash clang++ 2>/dev/null; then + export CXX=clang++ +else + unset CXX +fi + # .custom if [ -f ~/.custom ]; then source ~/.custom diff --git a/zshrc b/zshrc index afd8cce2..1aedcc5e 100644 --- a/zshrc +++ b/zshrc @@ -10,7 +10,7 @@ UNAME=$(uname) # enable terminal bell -if [ -f /usr/bin/xset ]; +if [[ -f /usr/bin/xset ]]; then (xset b on&) fi @@ -774,6 +774,22 @@ erase-mbr() { echo dd if=/dev/zero of=$1 bs=512 count=2 } +# Use clang if installed. It seems interesting and this is probably good +# way to test it. This might not be a function, but I don't have any better +# place for this. +if hash clang 2>/dev/null; then + export CC=clang +else + unset CC +fi + +if hash clang++ 2>/dev/null; then + export CXX=clang++ +else + unset CXX +fi + + # Source files for miscannellious modifications. # .custom