source: trunk/geomag_profile.sh @ 3

Last change on this file since 3 was 3, checked in by pinsard, 17 years ago

add geomag_profile.sh for environment definition

  • Property svn:executable set to *
  • Property svn:keyword set to Id
File size: 1.7 KB
Line 
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#
26set -u
27set -o posix # ++ toutes les machines ne supportent pas forcément cette option
28#
29command='geomag_profile.sh'
30#
31GEOMAG=/usr/home/fplod/incas/geomag/ # ++ machine dependant
32# test if $GEOMAG available
33if [ ! -d ${GEOMAG} ]
34then
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
38fi
39#
40# add GEOMAG tools to PATH
41# if not already done
42echo ${PATH} | grep -q ${GEOMAG}
43test_path=${?}
44if [ ${test_path} -ne 0 ]
45then
46   PATH=${GEOMAG}/:${PATH}
47   export PATH
48else
49   # option bavarde oui/non pas encore implantée ++
50   echo "${command} : iii : ${GEOMAG}/ already in \${PATH}"
51fi
52#
53# add GEOMAG manuals to MANPATH
54# if not already done
55echo ${MANPATH} | grep -q ${GEOMAG}
56test_manpath=${?}
57if [ ${test_manpath} -ne 0 ]
58then
59   MANPATH=${GEOMAG}/man/:${MANPATH}
60   export MANPATH
61else
62   # option bavarde oui/non pas encore implantée ++
63   echo "${command} : iii : ${GEOMAG}/man/ already in \${MANPATH}"
64fi
65#
66GEOMAG_LOG=/usr/temp/${LOGNAME}/log/
67export GEOMAG_LOG
68#
69EDITOR=vi
70export EDITOR
71#
72# io directories
73GEOMAG_ID=${HOME}/geomag_d/
74export GEOMAG_ID
75GEOMAG_OD=${HOME}/geomag_d/
76export GEOMAG_OD
77#
78# end
79# nb : no exit because this file should be launched by login process
80# ++ how to worn user
Note: See TracBrowser for help on using the repository browser.