Move some system-specific settings to their corresponding env files
This commit is contained in:
parent
076c483a7c
commit
c77765dfa2
3 changed files with 20 additions and 22 deletions
20
env
20
env
|
@ -39,26 +39,6 @@ PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
|
||||||
|
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
print_info -l 2 "Setting up $SYS environment"
|
|
||||||
case $SYS in
|
|
||||||
darwin)
|
|
||||||
if [[ -d "$HOME/Library/Python/2.7/bin" ]]; then
|
|
||||||
export PATH="$HOME/Library/Python/2.7/bin:$PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local py27local=$HOME/Library/Python/2.7/lib/python/site-packages
|
|
||||||
if [[ ! -z $PYTHONPATH ]]; then
|
|
||||||
[[ -d $py27local ]] && PYTHONPATH=$py27local:$PYTHONPATH
|
|
||||||
else
|
|
||||||
PYTHONPATH=$py27local
|
|
||||||
fi
|
|
||||||
export PYTHONPATH
|
|
||||||
;;
|
|
||||||
linux)
|
|
||||||
export MAIL="/var/mail/$USER"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# System specific settings
|
# System specific settings
|
||||||
if [[ -e "$HOME/.env.$SYS" ]]; then
|
if [[ -e "$HOME/.env.$SYS" ]]; then
|
||||||
print_info -l 2 "Sourcing environment setup for $SYS systems"
|
print_info -l 2 "Sourcing environment setup for $SYS systems"
|
||||||
|
|
17
env.darwin
17
env.darwin
|
@ -1,7 +1,20 @@
|
||||||
# vim: set ft=zsh:
|
# vim: set ft=zsh:
|
||||||
# Eryn Wells <eryn@erynwells.me>
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
|
[[ -d "$HOME/Library/Python/2.7/bin" ]]
|
||||||
|
&& path=("$HOME/Library/Python/2.7/bin" $path)
|
||||||
[[ -d "/usr/local/share/python3" ]] \
|
[[ -d "/usr/local/share/python3" ]] \
|
||||||
&& path+=("/usr/local/share/python3")
|
&& path+=("/usr/local/share/python3")
|
||||||
|
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
|
|
||||||
|
py27local="$HOME/Library/Python/2.7/lib/python/site-packages"
|
||||||
|
if [[ -d "$py27local" ]]; then
|
||||||
|
if [[ ! -z $PYTHONPATH ]]; then
|
||||||
|
PYTHONPATH=$py27local:$PYTHONPATH
|
||||||
|
else
|
||||||
|
PYTHONPATH=$py27local
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
unset py27local
|
||||||
|
export PYTHONPATH
|
||||||
|
|
5
env.linux
Normal file
5
env.linux
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# vim: set ft=zsh:
|
||||||
|
# Linux specific environment settings
|
||||||
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
|
export MAIL="/var/mail/$USER"
|
Loading…
Add table
Add a link
Reference in a new issue