]> git.zndr.dk Git - dotfiles.git/commitdiff
Platform specific bash settings
authorJannik ZANDER <jannikz@gmail.com>
Wed, 4 May 2016 15:27:30 +0000 (17:27 +0200)
committerJannik ZANDER <jannikz@gmail.com>
Wed, 4 May 2016 15:27:30 +0000 (17:27 +0200)
.bash/extra
.bash/solarized
.bashrc
bin/colortest [changed mode: 0644->0755]

index 636e36edc5734e6abbd465443a57abebea00ac98..944ac7274f9c8d53d8bc92f41cfd37475a5c6d15 100644 (file)
@@ -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
index 4f6c7e665052158663b32eb458e770ed2be4e68b..e9ca994c9c57e135d4169d9dac402d2f15f5e77e 100644 (file)
@@ -1,3 +1,5 @@
+[ "$PLATFORM" == "Darwin" ] && return;\r
+\r
 echo -ne   '\eP\e]10;#839496\a'  # Foreground   -> base0\r
 echo -ne   '\eP\e]11;#002B36\a'  # Background   -> base03\r
 \r
diff --git a/.bashrc b/.bashrc
index e2e9195588b8638eda23b1bc8f354cf4af611879..d999253f1461d007895620dc51b2860a31222721 100644 (file)
--- 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";
old mode 100644 (file)
new mode 100755 (executable)