]> gitweb @ CieloNegro.org - sugar.git/blob - dot-files/_zshenv
Auto commit by The Sugar System.
[sugar.git] / dot-files / _zshenv
1 # -*- sh -*-
2
3 function append_path {
4     local _varname="$1"
5     local _path="$2"
6
7     if [[ -d "$_path" ]]; then
8         local _var=$(eval echo $(printf '$%s' "$_varname"))
9
10         if [[ "$_var" = "" ]]; then
11             eval $(printf 'export %s="%s"' "$_varname" "$_path")
12         else
13             eval $(printf 'export %s="%s:$%s"' "$_varname" "$_path" "$_varname")
14         fi
15     fi
16 }
17
18 # PATH
19 export PATH=""
20 append_path PATH /bin
21 append_path PATH /sbin
22 append_path PATH /usr/bin
23 append_path PATH /usr/sbin
24 append_path PATH /usr/X11R7/bin
25 append_path PATH /usr/local/bin
26 append_path PATH /usr/local/sbin
27 append_path PATH /usr/local/cross/bin
28 append_path PATH /opt/local/bin
29 append_path PATH /opt/local/sbin
30 append_path PATH /opt/pkg/bin
31 append_path PATH /opt/pkg/sbin
32 append_path PATH /usr/pkg/bin
33 append_path PATH /usr/pkg/sbin
34 append_path PATH /usr/pkg/lib/perl5/site_perl/bin
35 append_path PATH /usr/pkg/java/openjdk7/bin
36 append_path PATH /usr/local/java-1.7.0/bin
37 append_path PATH /usr/local/sbt/bin
38 append_path PATH $HOME/bin
39 append_path PATH $HOME/.cargo/bin
40 append_path PATH $HOME/sandbox/_phabricator/arcanist/bin
41 # Hope these could be removed someday!
42 append_path PATH /usr/local/ymir/erlang/bin
43 append_path PATH /usr/local/ymir/mercurial/bin
44 append_path PATH /usr/local/ymir/mongodb/bin
45 append_path PATH /usr/local/ymir/mongodb34/bin
46 append_path PATH /usr/local/ymir/mongodb36/bin
47 append_path PATH /usr/local/ymir/mongodb40/bin
48 append_path PATH /usr/local/ymir/mongodb42/bin
49 append_path PATH /usr/local/ymir/nodejs/bin
50 append_path PATH /usr/local/ymir/perl/bin
51 append_path PATH /usr/local/ymir/postgresql90/bin
52
53 # MANPATH
54 export MANPATH=""
55 append_path MANPATH /usr/share/man
56 append_path MANPATH /usr/local/man
57 append_path MANPATH /usr/local/cross/share/man
58 append_path MANPATH /usr/local/share/man
59 append_path MANPATH /opt/local/share/man
60 append_path MANPATH /opt/pkg/man
61 append_path MANPATH /usr/pkg/man
62 append_path MANPATH /usr/X11R7/man
63
64 # INFOPATH
65 export INFOPATH=""
66 append_path INFOPATH /usr/share/info
67 append_path INFOPATH /usr/local/info
68 append_path INFOPATH /usr/local/share/info
69 append_path INFOPATH /usr/local/cross/share/info
70 append_path INFOPATH /opt/local/share/info
71 append_path INFOPATH /opt/pkg/info
72 append_path INFOPATH /usr/pkg/info
73
74 # PKG_CONFIG_PATH
75 export PKG_CONFIG_PATH=""
76 append_path PKG_CONFIG_PATH /usr/lib/pkgconfig
77 append_path PKG_CONFIG_PATH /usr/local/lib/pkgconfig
78 append_path PKG_CONFIG_PATH /usr/local/cross/lib/pkgconfig
79 append_path PKG_CONFIG_PATH /opt/local/lib/pkgconfig
80 append_path PKG_CONFIG_PATH /opt/pkg/lib/pkgconfig
81 append_path PKG_CONFIG_PATH /usr/pkg/lib/pkgconfig
82
83 # TMPDIR (Only for Darwin)
84 if [ `uname` = "Darwin" ]; then
85     if [ "$TMPDIR" = "" ]; then
86         export TMPDIR=`getconf DARWIN_USER_TEMP_DIR`
87     fi
88 fi
89
90 # DYLD_FALLBACK_LIBRARY_PATH (Only for Darwin)
91 export DYLD_FALLBACK_LIBRARY_PATH=""
92 #append_path DYLD_FALLBACK_LIBRARY_PATH /usr/lib
93 #append_path DYLD_FALLBACK_LIBRARY_PATH /usr/pkg/lib
94
95 # Languages
96 export LANGUAGAE="ja"
97 export LANG="ja_JP.UTF-8"
98 export OUTPUT_CHARSET="UTF-8"
99
100 # Default Tools
101 export EDITOR="vim"
102 export PAGER="less"
103
104 # pkgsrc
105 export NETBSD_LOGIN_NAME=pho
106 if [[ $(hostname) = "nem.cielonegro.org" ]]; then
107     export PKG_DBDIR=/usr/pkgdb
108 fi
109
110 # GUI Toolkits
111 export SDL_VIDEODRIVER="x11"
112 if [[ $(uname) = "Darwin" ]]; then
113     export GGI_DISPLAY=x:-noshm
114 fi
115
116 # Input Methods
117 export UIM_FEP=skk
118 export GTK_IM_MODULE=uim
119
120 # Application Settings
121 export LV="-Ia -c"
122 export LESS="--quit-if-one-screen -R"
123 export PERL_BADLANG=0
124 export HGMERGE=merge
125
126 # Angband / Zangband / Hengband
127 export ANGBAND_X11_FONT_0="-*-courier-medium-r-normal--24-*-*-*-*-*-iso8859-1" # main
128 export ANGBAND_X11_FONT="-*-courier-medium-r-normal--16-*-*-*-*-*-iso8859-1" # others
129
130 # darcs
131 export DARCS_EMAIL="pho@cielonegro.org"
132 export DARCS_DONT_ESCAPE_8BIT=1
133
134 # CVS
135 export CVS_RSH=ssh
136
137 # sox
138 export AUDIODRIVER=ao
139
140 # Amazon EC2
141 if [[ -e "$HOME/.ec2/environ.sh" ]]; then
142     . "$HOME/.ec2/environ.sh"
143 fi
144
145 # icc
146 if [[ -e /opt/intel/cce/latest/bin/iccvars.sh ]]; then
147     . /opt/intel/cce/latest/bin/iccvars.sh
148     . /opt/intel/ipp/latest/em64t/tools/env/ippvarsem64t.sh
149 fi