1 | # !/bin/sh |
---|
2 | # |
---|
3 | # module : |
---|
4 | # define GEOMAG environnement |
---|
5 | # |
---|
6 | # usage : |
---|
7 | # online usage |
---|
8 | # $ . geomag_profile.sh |
---|
9 | # |
---|
10 | # in ${HOME}/.profile, add the following line |
---|
11 | # . geomag_profile.sh |
---|
12 | # |
---|
13 | # original location |
---|
14 | # geomag_profile.sh sur aedon.lodyc.jussieu.fr |
---|
15 | # |
---|
16 | # update : |
---|
17 | # ++ option bavarde |
---|
18 | # ++ machine dependant |
---|
19 | # ++ besoin de posix |
---|
20 | # ++ doc |
---|
21 | # $Id$ |
---|
22 | # fplod 2006-03-22T10:13:38Z aedon.lodyc.jussieu.fr (Darwin) |
---|
23 | # creation |
---|
24 | # |
---|
25 | # |
---|
26 | set -u |
---|
27 | set -o posix # ++ toutes les machines ne supportent pas forcément cette option |
---|
28 | # |
---|
29 | command='geomag_profile.sh' |
---|
30 | # |
---|
31 | GEOMAG=/usr/home/fplod/incas/geomag/ # ++ machine dependant |
---|
32 | # test if $GEOMAG available |
---|
33 | if [ ! -d ${GEOMAG} ] |
---|
34 | then |
---|
35 | echo "${command} : eee : ${GEOMAG} directory not available" |
---|
36 | # nb : no exit because this file should be launched by login process |
---|
37 | # ++ how to worn user |
---|
38 | fi |
---|
39 | # |
---|
40 | # add GEOMAG tools to PATH |
---|
41 | # if not already done |
---|
42 | echo ${PATH} | grep -q ${GEOMAG} |
---|
43 | test_path=${?} |
---|
44 | if [ ${test_path} -ne 0 ] |
---|
45 | then |
---|
46 | PATH=${GEOMAG}/:${PATH} |
---|
47 | export PATH |
---|
48 | else |
---|
49 | # option bavarde oui/non pas encore implantée ++ |
---|
50 | echo "${command} : iii : ${GEOMAG}/ already in \${PATH}" |
---|
51 | fi |
---|
52 | # |
---|
53 | # add GEOMAG manuals to MANPATH |
---|
54 | # if not already done |
---|
55 | echo ${MANPATH} | grep -q ${GEOMAG} |
---|
56 | test_manpath=${?} |
---|
57 | if [ ${test_manpath} -ne 0 ] |
---|
58 | then |
---|
59 | MANPATH=${GEOMAG}/man/:${MANPATH} |
---|
60 | export MANPATH |
---|
61 | else |
---|
62 | # option bavarde oui/non pas encore implantée ++ |
---|
63 | echo "${command} : iii : ${GEOMAG}/man/ already in \${MANPATH}" |
---|
64 | fi |
---|
65 | # |
---|
66 | GEOMAG_LOG=/usr/temp/${LOGNAME}/log/ |
---|
67 | export GEOMAG_LOG |
---|
68 | # |
---|
69 | EDITOR=vi |
---|
70 | export EDITOR |
---|
71 | # |
---|
72 | # io directories |
---|
73 | GEOMAG_ID=${HOME}/geomag_d/ |
---|
74 | export GEOMAG_ID |
---|
75 | GEOMAG_OD=${HOME}/geomag_d/ |
---|
76 | export GEOMAG_OD |
---|
77 | # |
---|
78 | # end |
---|
79 | # nb : no exit because this file should be launched by login process |
---|
80 | # ++ how to worn user |
---|