-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpath.sh
63 lines (49 loc) · 1.69 KB
/
path.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# -*- mode: shell-script; -*-
#
# Setup various *PATH variables. Many of these will not exist on a
# given machine, but are intended to be exported (via rXcmd) to other
# machines.
#
#echo In .path
#echo "Path: " $PATH
:
: '$PATH', '$GOPATH', '$MANPATH', and '$LD_LIBRARY_PATH' setup
:
# build updated PATH value off to side
tmppath="$PATH"
: GOPATH
export GOPATH="$HOME/go"
#[[ -d "$GOPATH/bin" && "$tmppath" != *$GOPATH/bin* ]] && tmppath="$GOPATH/bin:$tmppath"
: Rust
[[ -d "$HOME/.cargo/bin" && "$tmppath" != *$HOME/.cargo/bin* ]] && tmppath="$HOME/.cargo/bin:$tmppath"
: Python
[[ -d "$HOME/pbin" && "$tmppath" != *$HOME/pbin* ]] && tmppath="$HOME/pbin:$tmppath"
: Personal commands
# bash dependent code here
[[ -d "$HOME/bin" && "$tmppath" != *$HOME/bin* ]] && tmppath="$HOME/bin:$tmppath"
[[ -d "$HOME/sh" && "$tmppath" != *$HOME/sh* ]] && tmppath="$HOME/sh:$tmppath"
[[ -d "$HOME/sh.local" && "$tmppath" != *$HOME/sh.local* ]] && tmppath="$HOME/sh.local:$tmppath"
[[ "$tmppath" != *:. ]] && tmppath="$tmppath:."
export PATH="$tmppath"
#echo Path: $PATH
# Old/obsolete setup below
#MANPATH=/usr/share/man
#PERLLIB=/usr/local/lib/perl
#: personal PERL libraries
#if [ -d "$HOME/lib/perl" ]
#then
# :
# addpath PERLLIB "$HOME/lib/perl"
#fi
#: Java CLASSPATH
## why would we do this? CLASSPATH=.
# pathadd CLASSPATH ~/lib/java
# pathadd CLASSPATH ~/play/classes
# pathadd CLASSPATH ~/lib/java/bsh.jar ~/lib/java/jde.jar
#export CLASSPATH
# Source local path file if it exists
[ -r $HOME/.path.local ] && . $HOME/.path.local
#: export the paths
#[ "$MANPATH" ] && export MANPATH
#[ "$LD_LIBRARY_PATH" ] && export LD_LIBRARY_PATH
#[ "$PERLLIB" ] && export PERLLIB