Changeset 26
- Timestamp:
- 06/14/07 16:52:57 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geomag_profile.sh
r17 r26 6 6 # usage : 7 7 # online usage 8 # $ . geomag_profile.sh -d directory 8 # $ . geomag_profile.sh -d directory -i indir -o outdir -t tempdir 9 9 # 10 10 # in ${HOME}/.profile, add the following line 11 # . geomag_profile.sh -d directory 11 # . geomag_profile.sh -d directory -i indir -o outdir -t tempdir 12 12 # 13 13 # examples : 14 # for fplod, on aedon.locean-ipsl.upmc.fr 14 # for fplod, on aedon.locean-ipsl.upmc.fr 15 15 # $ cd /usr/home/fplod/incas/geomag/geomag_ws 16 # $ . geomag_profile.sh -d /usr/home/fplod/incas/geomag/geomag_ws/ 16 # $ . geomag_profile.sh -d /usr/home/fplod/incas/geomag/geomag_ws/ -i ${HOME}/geomag_d/ -o ${HOME}/geomag_d/ -t /usr/temp/${LOGNAME}/log/ 17 # 17 18 # for reee522 on rhodes.idris.fr 18 19 # $ cd ${HOME}/incas/geomag/geomag_ws/ 19 # $ . geomag_profile.sh -d ${HOME}/incas/geomag/geomag_ws/ 20 # $ . geomag_profile.sh -d ${HOME}/incas/geomag/geomag_ws/ -i ${HOMEGAYA}/geomag_d/ -o ${HOMEGAYA}/geomag_d/ -t /tmp/${LOGNAME}/log/ 20 21 # 21 22 # original location … … 26 27 # ++ machine dependant 27 28 # ++ besoin de posix 28 # ++ pas de MANPATH defini par déut sur zeus 29 # ++ pas de MANPATH defini par déubt sur zeus 30 # reee522 2007-06-14T14:25:00Z rhodes (IRIX64) 31 # add -i, -o and -t parameters to be more flexible 32 # some bug fixes 33 # more checking 29 34 # fplod 2007-03-13T16:12:41Z zeus.locean-ipsl.upmc.fr (Linux) 30 35 # add creation of $GEOMAG_ID and $GEOMAG_OD if they don't exist … … 38 43 command=geomag_profile.sh 39 44 # 40 usage=" Usage : ${command} -d directory "45 usage=" Usage : ${command} -d directory -i indir -o outdir -t tempdir" 41 46 # 42 47 while [ ! -z "${1}" ] # ++ pb bash 43 48 do 44 49 case ${1} in 45 -d) # directory choosen by user50 -d) # directory for application choosen by user (see svn checkout command used) 46 51 directory=${2} 47 52 shift 48 53 ;; 54 -i) # directory for inputs choosen by user 55 indir=${2} 56 shift 57 ;; 58 -o) # directory for outputs choosen by user 59 outdir=${2} 60 shift 61 ;; 62 -t) # directory for temporary outputs choosen by user 63 tempdir=${2} 64 shift 65 ;; 66 49 67 *) # other choice 50 68 echo "${usage}" … … 71 89 set -u 72 90 system=$(uname) 73 case ${system}in91 case "${system}" in 74 92 IRIX64) 75 93 echo " www : no specific posix checking" … … 79 97 ;; 80 98 esac 81 #82 99 # 83 100 GEOMAG=${directory} … … 110 127 fi 111 128 # 112 GEOMAG_LOG= /usr/temp/${LOGNAME}/log/129 GEOMAG_LOG=${tempdir} 113 130 export GEOMAG_LOG 131 if [ ! -d ${GEOMAG_LOG} ] 132 then 133 mkdir -p ${GEOMAG_LOG} 134 echo "${command} : iii : creation of \${GEOMAG_LOG}" 135 fi 136 # check for permission on GEOMAG_LOG 137 if [ ! -x ${GEOMAG_LOG} ] 138 then 139 echo " eee : ${GEOMAG_LOG} not reachable" 140 # nb : no exit because this file should be launched by login process 141 fi 142 # 143 # check for permission on GEOMAG_LOG 144 if [ ! -w ${GEOMAG_LOG} ] 145 then 146 echo " eee : ${GEOMAG_LOG} not writable" 147 # nb : no exit because this file shouldreachable be launched by login process 148 fi 114 149 # 115 150 EDITOR=vi … … 117 152 # 118 153 # io directories 119 GEOMAG_ID=${ HOME}/geomag_d/154 GEOMAG_ID=${indir} 120 155 export GEOMAG_ID 121 156 if [ ! -d ${GEOMAG_ID} ] … … 124 159 echo "${command} : iii : creation of \${GEOMAG_ID}" 125 160 fi 126 GEOMAG_OD=${HOME}/geomag_d/ 161 # check for permission on GEOMAG_ID 162 if [ ! -x ${GEOMAG_ID} ] 163 then 164 echo " eee : ${GEOMAG_ID} not reachable" 165 # nb : no exit because this file should be launched by login process 166 fi 167 # 168 GEOMAG_OD=${outdir} 127 169 export GEOMAG_OD 128 if [ ! -d ${GEOMAG_ ID} ]170 if [ ! -d ${GEOMAG_OD} ] 129 171 then 130 172 mkdir -p ${GEOMAG_OD} 131 173 echo "${command} : iii : creation of \${GEOMAG_OD}" 132 174 fi 175 # check for permission on GEOMAG_OD 176 if [ ! -x ${GEOMAG_OD} ] 177 then 178 echo " eee : ${GEOMAG_OD} not reachable" 179 # nb : no exit because this file should be launched by login process 180 fi 181 if [ ! -w ${GEOMAG_OD} ] 182 then 183 echo " eee : ${GEOMAG_OD} not writable" 184 # nb : no exit because this file should be launched by login process 185 fi 133 186 # 134 187 # end
Note: See TracChangeset
for help on using the changeset viewer.