shoestrap/assets/default/fish/init/paths.fish

59 lines
1.4 KiB
Fish
Raw Normal View History

2015-06-05 19:16:12 +00:00
set det_os "unknown"
switch (uname)
case "Darwin"
set det_os "mac"
case "Linux"
set det_os "linux"
case '*'
set det_os "unknown"
end
# opt directory
2016-02-04 18:33:08 +00:00
if [ -d /opt/local ]
set -gx PATH /opt/local/bin /opt/local/sbin $PATH
end
2015-06-13 00:34:49 +00:00
if [ $det_os = "linux" ]
2015-06-05 19:16:12 +00:00
set android_sdk $HOME/workspace/adt-bundle-linux/sdk
2015-06-13 00:34:49 +00:00
else if [ $det_os = "mac" ]
2015-06-05 19:16:12 +00:00
set android_sdk $HOME/workspace/android-sdk-macosx
2015-06-13 00:34:49 +00:00
# Set go paths
2017-07-25 21:03:44 +00:00
set -gx GOPATH $HOME/workspace/go_path
2015-08-26 21:29:51 +00:00
2015-06-13 00:34:49 +00:00
# Fix Python path on OSX to avoid considering System extras over newer versions
set -gx PATH $PATH $HOME/Library/Python/2.7/bin
2017-08-23 18:26:22 +00:00
set -gx PYTHONPATH /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages:$PYTHONPATH
2017-11-16 18:22:02 +00:00
set -gx PATH $PATH /opt/local/Library/Frameworks/Python.framework/Versions/Current/bin
2015-06-05 19:16:12 +00:00
end
# Add rust path
set -gx PATH $HOME/.cargo/bin $PATH
# Google GO
2017-07-25 21:03:44 +00:00
if [ -d "$GOPATH" ]
set -gx PATH $PATH $GOPATH/bin
end
2015-08-26 21:29:51 +00:00
2016-02-04 18:33:08 +00:00
# Android paths
if [ -d "$android_sdk" ]
set -gx ANDROID_HOME $android_sdk
set -gx PATH $PATH $android_sdk/platform-tools $android_sdk/tools
end
2015-06-05 19:16:12 +00:00
2017-11-16 18:22:02 +00:00
# Ruby paths
# Add RVM to PATH for scripting
if [ -d "$HOME/.rvm" ]
set -gx PATH $PATH $HOME/.rvm/bin
end
2018-04-05 23:10:38 +00:00
# NPM paths
# On mac the path should already be taken care of
if type -q npm ; and [ $det_os != "mac" ]
set -gx PATH $PATH (npm bin -g)
end
2016-02-04 18:33:08 +00:00
# Home path
2017-11-01 01:38:31 +00:00
set -gx PATH $HOME/bin $HOME/.local/bin $PATH