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