shoestrap/assets/default/dotfiles/bashrc

70 lines
1.9 KiB
Bash
Raw Permalink Normal View History

2013-08-08 03:23:13 +00:00
DET_OS="unknown"
UNAME_STR=`uname`
# Some settings are mac specific
if [[ "$UNAME_STR" == "Darwin" ]]; then
DET_OS="mac"
elif [[ "$UNAME_STR" == "Linux" ]]; then
DET_OS="linux"
fi
# Source bash alaias
if [ -f ~/.bash_alias ]; then
. ~/.bash_alias
fi
# Common paths for me
export PATH=$PATH:$ANT_HOME/bin
# Opt directory
2016-02-04 18:33:08 +00:00
if [ -d /opt/local ]; then
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
fi
2013-08-08 03:23:13 +00:00
if [[ "$DET_OS" == "linux" ]]; then
ANDROID_SDK=$HOME/workspace/adt-bundle-linux/sdk
elif [[ "$DET_OS" == "mac" ]]; then
ANDROID_SDK=$HOME/workspace/android-sdk-macosx
2016-02-04 18:33:08 +00:00
# Set GOPATH
GOROOT=/opt/local/lib/go
GOPATH=$HOME/workspace/go_path
2015-06-13 00:34:49 +00:00
# Fix Python path on OSX to avoid considering System extras over newer versions
2016-02-04 18:33:08 +00:00
# export PATH=$HOME/Library/Python/2.7/bin:$PATH
# export PYTHONPATH=/Library/Python/2.7/site-packages:$PYTHONPATH
export PYTHONPATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages:/Library/Python/2.7/site-packages:$PYTHONPATH
2013-08-08 03:23:13 +00:00
fi
2016-02-04 18:33:08 +00:00
# Android paths
if [ -d "$ANDROID_SDK" ]; then
export ANDROID_HOME=$ANDROID_SDK
export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools
fi
# Go paths
if [ -d "$GOPATH" ]; then
export GOPATH
export PATH=$PATH:$GOPATH/bin
fi
if [ -d "$GOROOT" ]; then
export GOROOT
export PATH=$PATH:$GOROOT/bin
fi
2016-02-04 18:33:08 +00:00
# Home path
2013-08-08 03:23:13 +00:00
export PATH=$HOME/bin:$PATH
2016-02-04 18:33:08 +00:00
# Add RVM to PATH for scripting
export PATH=$PATH:$HOME/.rvm/bin
2013-08-08 03:23:13 +00:00
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Increase memory sizes for java using Ant
ANT_OPTS="-Xmx2048m -Xms512m"
# Set file as having been loaded to avoid looping
IS_BASHRC_LOADED=true
# If an interactive shell and .bash_profile hasn't been loaded, load it
if [ -n "$PS1" ] && [ -z "$IS_BASH_PROFILE_LOADED" ] ; then
source $HOME/.bash_profile
fi