From: Jannik ZANDER Date: Wed, 4 May 2016 15:27:30 +0000 (+0200) Subject: Platform specific bash settings X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=e78f4621da7d5af3caaf0a3b1163042dc9112720;p=dotfiles.git Platform specific bash settings --- diff --git a/.bash/extra b/.bash/extra index 636e36e..944ac72 100644 --- a/.bash/extra +++ b/.bash/extra @@ -1,23 +1,3 @@ -# Determine host platform - -if [ "$(uname)" == "SunOS" ]; then - PLATFORM="SunOS"; -elif [ "$(uname)" == "MINGW32_NT-6.1" ]; then - PLATFORM="Msys"; -elif [ "$(uname)" == "Darwin" ]; then - PLATFORM="Darwin"; -elif [ "$(uname -o)" == "GNU/Linux" ]; then - PLATFORM="Linux"; -elif [ "$(uname -o)" == "Msys" ]; then - PLATFORM="Msys"; -elif [ "$(uname -o)" == "Cygwin" ]; then - PLATFORM="Cygwin"; -else - PLATFORM="Unknown"; -fi -export PLATFORM -echo Now running on $PLATFORM platform; - # Platform specific if [ "$PLATFORM" == "Msys" ]; then # Mount the portable Documents folder, if it isn't already diff --git a/.bash/solarized b/.bash/solarized index 4f6c7e6..e9ca994 100644 --- a/.bash/solarized +++ b/.bash/solarized @@ -1,3 +1,5 @@ +[ "$PLATFORM" == "Darwin" ] && return; + echo -ne '\eP\e]10;#839496\a' # Foreground -> base0 echo -ne '\eP\e]11;#002B36\a' # Background -> base03 diff --git a/.bashrc b/.bashrc index e2e9195..d999253 100644 --- a/.bashrc +++ b/.bashrc @@ -3,6 +3,24 @@ # If not running interactively, don't do anything [[ "$-" != *i* ]] && return +# Determine host platform +if [ "$(uname)" == "SunOS" ]; then + PLATFORM="SunOS"; +elif [ "$(uname)" == "Darwin" ]; then + PLATFORM="Darwin"; +elif [ "$(uname -o)" == "GNU/Linux" ]; then + PLATFORM="Linux"; +elif [ "$(uname -o)" == "Msys" ]; then + PLATFORM="Msys"; +elif [ "$(uname -o)" == "Cygwin" ]; then + PLATFORM="Cygwin"; +else + PLATFORM="Unknown"; +fi +export PLATFORM +echo Now running on $PLATFORM platform + + # Load settings for file in ${HOME}/.bash/*; do [ -f "$file" ] && source "$file"; diff --git a/bin/colortest b/bin/colortest old mode 100644 new mode 100755