dotfiles/dotfiles/lib/shellrc.sh

29 lines
937 B
Bash
Raw Normal View History

function add_to_front_of_path {
export PATH=$@:$(echo $PATH | sed "s|:*$@||g" | sed "s|^:||")
}
function add_to_back_of_path {
export PATH=$(echo $PATH | sed "s|:*$@||g" | sed "s|^:||"):$@
}
add_to_back_of_path "$HOME/.local/lib/python2.6/site-packages"
hash brew 2>/dev/null && add_to_front_of_path "$(brew --prefix coreutils)/libexec/gnubin"
add_to_front_of_path "/usr/local/bin"
hash brew 2>/dev/null && add_to_front_of_path "$(brew --prefix emacs)/libexec/gnubin"
for filename in ~/.lib/shellrc/*; do
source $filename
done
if is_osx; then
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
2014-10-20 17:41:14 -06:00
add_to_back_of_path "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/"
fi
add_to_back_of_path "$(dotfiles_directory)/resources/python"
2014-10-20 17:41:14 -06:00
add_to_back_of_path "/usr/local/sbin"
# Access gnu man pages.
2014-10-20 19:53:54 -06:00
MANPATH="$(brew --prefix)/opt/coreutils/libexec/gnuman:$MANPATH"