]> 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/local/bin
25 append_path PATH /usr/local/sbin
26 append_path PATH /usr/local/cross/bin
27 append_path PATH /opt/local/bin
28 append_path PATH /opt/local/sbin
29 append_path PATH /usr/pkg/bin
30 append_path PATH /usr/pkg/sbin
31 append_path PATH /usr/pkg/lib/perl5/site_perl/bin
32 append_path PATH /usr/pkg/java/openjdk7/bin
33 append_path PATH /usr/local/java-1.7.0/bin
34 append_path PATH /usr/local/sbt/bin
35 append_path PATH $HOME/bin
36 append_path PATH $HOME/sandbox/_phabricator/arcanist/bin
37 # Hope these could be removed someday!
38 append_path PATH /usr/local/ymir/erlang/bin
39 append_path PATH /usr/local/ymir/mercurial/bin
40 append_path PATH /usr/local/ymir/mongodb/bin
41 append_path PATH /usr/local/ymir/nodejs/bin
42 append_path PATH /usr/local/ymir/perl/bin
43 append_path PATH /usr/local/ymir/postgresql90/bin
44
45 # MANPATH
46 export MANPATH=""
47 append_path MANPATH /usr/share/man
48 append_path MANPATH /usr/local/man
49 append_path MANPATH /usr/local/cross/share/man
50 append_path MANPATH /usr/local/share/man
51 append_path MANPATH /opt/local/share/man
52 append_path MANPATH /usr/pkg/man
53
54 # INFOPATH
55 export INFOPATH=""
56 append_path INFOPATH /usr/share/info
57 append_path INFOPATH /usr/local/info
58 append_path INFOPATH /usr/local/share/info
59 append_path INFOPATH /usr/local/cross/share/info
60 append_path INFOPATH /opt/local/share/info
61 append_path INFOPATH /usr/pkg/info
62
63 # PKG_CONFIG_PATH
64 export PKG_CONFIG_PATH=""
65 append_path PKG_CONFIG_PATH /usr/lib/pkgconfig
66 append_path PKG_CONFIG_PATH /usr/local/lib/pkgconfig
67 append_path PKG_CONFIG_PATH /usr/local/cross/lib/pkgconfig
68 append_path PKG_CONFIG_PATH /opt/local/lib/pkgconfig
69 append_path PKG_CONFIG_PATH /usr/pkg/lib/pkgconfig
70
71 # TMPDIR (Only for Darwin)
72 if [ `uname` = "Darwin" ]; then
73     if [ "$TMPDIR" = "" ]; then
74         export TMPDIR=`getconf DARWIN_USER_TEMP_DIR`
75     fi
76 fi
77
78 # DYLD_FALLBACK_LIBRARY_PATH (Only for Darwin)
79 export DYLD_FALLBACK_LIBRARY_PATH=""
80 #append_path DYLD_FALLBACK_LIBRARY_PATH /usr/lib
81 #append_path DYLD_FALLBACK_LIBRARY_PATH /usr/pkg/lib
82
83 # Languages
84 export LANGUAGAE="ja"
85 export LANG="ja_JP.UTF-8"
86 export OUTPUT_CHARSET="UTF-8"
87
88 # Default Tools
89 export EDITOR="vim"
90 export PAGER="less"
91
92 # pkgsrc
93 export NETBSD_LOGIN_NAME=pho
94 if [[ $(hostname) = "nem.cielonegro.org" ]]; then
95     export PKG_DBDIR=/usr/pkgdb
96 fi
97
98 # GUI Toolkits
99 export SDL_VIDEODRIVER="x11"
100 if [[ $(uname) = "Darwin" ]]; then
101     export GGI_DISPLAY=x:-noshm
102 fi
103
104 # Input Methods
105 export UIM_FEP=skk
106 export GTK_IM_MODULE=uim
107
108 # Application Settings
109 export LV="-Ia -c"
110 export LESS="--quit-if-one-screen -R"
111 export PERL_BADLANG=0
112 export HGMERGE=merge
113
114 # darcs
115 export DARCS_EMAIL="pho@cielonegro.org"
116 export DARCS_DONT_ESCAPE_8BIT=1
117
118 # CVS
119 export CVS_RSH=ssh
120
121 # sox
122 export AUDIODRIVER=ao
123
124 # Amazon EC2
125 if [[ -e "$HOME/.ec2/environ.sh" ]]; then
126     . "$HOME/.ec2/environ.sh"
127 fi
128
129 # icc
130 if [[ -e /opt/intel/cce/latest/bin/iccvars.sh ]]; then
131     . /opt/intel/cce/latest/bin/iccvars.sh
132     . /opt/intel/ipp/latest/em64t/tools/env/ippvarsem64t.sh
133 fi