Skip to content

Commit

Permalink
Fixed problem with OS Detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
reyjrar committed Mar 26, 2012
1 parent ef7bcd9 commit d9aff76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
19 changes: 6 additions & 13 deletions bash_profile
@@ -1,7 +1,4 @@
# .bash_profile
# -------------
# Set up the prompt, and export variables
export BASH_PROFILE=1;

# Colors:
txtblk='\e[0;30m' # Black - Regular
Expand Down Expand Up @@ -39,15 +36,11 @@ bakwht='\e[47m' # White
txtrst='\e[0m' # Text Reset

# Set Host Coloration based on OS
if [ `uname -s` == "Darwin" ]; then
# Darwin
host_color="$txtblu";
elif [ "$HOSTOS" == "Linux" ]; then
host_color="$txtred";
else
# Server Side, use username to determine color
host_color="$bldpur";
fi;
case `uname -s` in
"Darwin" ) host_color="$txtblu";;
"Linux" ) host_color="$txtred";;
* ) host_color="$bldpur";;
esac;

function get_user_color() {
# Set User Color based on Name
Expand Down Expand Up @@ -80,7 +73,7 @@ function before_prompt() {
printf "\n";
}

if [ "$PS1" ] && [ "$BASHRC" != "1" ]; then
if [ "$PS1" ] && [ "$BASHRC" != 1 ]; then
. ~/.bashrc
fi;

Expand Down
5 changes: 1 addition & 4 deletions bashrc
@@ -1,4 +1,5 @@
# .bashrc
export BASHRC=1;

# Source global definitions
if [ -f /etc/bashrc ]; then
Expand Down Expand Up @@ -53,10 +54,6 @@ if [ "$PS1" ]; then

export HISTCONTROL="ignoredups"
export HISTIGNORE="&:ls:[bf]g:exit"

if [ -z "$BASH_PROFILE" ] && [ -e ~/.bash_profile ]; then
. ~/.bash_profile
fi;
fi;

# Perl Brew
Expand Down

0 comments on commit d9aff76

Please sign in to comment.