Changeset 203 for trunk/src/project_profile.sh
- Timestamp:
- 02/11/14 18:41:24 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/project_profile.sh
r184 r203 13 13 # ======== 14 14 # 15 # Online usage:: 16 # 17 # $ . ./project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir -idl_cmd idl_cmd 18 # 19 # In ${HOME}/.profile, add the following line:: 20 # 21 # . project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir -idl_cmd idl_cmd 15 # Online usage: 16 # 17 # .. code-block:: bash 18 # 19 # . ./project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir -idl_cmd idl_cmd 20 # 21 # In ${HOME}/.profile, add the following line: 22 # 23 # .. code-block:: bash 24 # 25 # . project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir -idl_cmd idl_cmd 22 26 # 23 27 # DESCRIPTION … … 47 51 # IDL_STARTUP is set to tell IDL where find tools. 48 52 # 49 # If :option:`idl_cmd` is used, **idl_cmd** will be used as the IDL command 50 # when launched from scripts. 51 # By default, ${IDL_CMD} is set to `idl`. 53 # If :option:`idl_cmd` is used, **idl_cmd** will be used as the IDL command 54 # when launched from scripts. 55 # By default, ${IDL_CMD} is set to `idl`. 52 56 # 53 57 # FER_GO is completed with ${PROJECT}/src/ and ${PROJECT}/src/test/. … … 64 68 # ======== 65 69 # 66 # For fplod, on halios.locean-ipsl.upmc.fr using gdl (to be tested):: 67 # 68 # $ cd /usr/home/fplod/incas/tropflux/tropflux_ws/ 69 # $ . ./src/project_profile.sh \ 70 # For fplod, on halios.locean-ipsl.upmc.fr using gdl (to be tested): 71 # 72 # .. code-block:: bash 73 # 74 # cd /usr/home/fplod/incas/tropflux/tropflux_ws/ 75 # . ./src/project_profile.sh \ 70 76 # -d $(pwd) \ 71 77 # -i /usr/temp/${LOGNAME}/tropflux_d/ \ … … 75 81 # -idl_cmd gdl 76 82 # 77 # For fplod on cratos.locean-ipsl.umpc.fr using idl 7.0:: 78 # 79 # $ cd ${HOME}/incas/tropflux/tropflux_ws/ 80 # $ . ./src/project_profile.sh \ 83 # For fplod on cratos.locean-ipsl.umpc.fr using idl 7.0: 84 # 85 # .. code-block:: bash 86 # 87 # cd ${HOME}/incas/tropflux/tropflux_ws/ 88 # . ./src/project_profile.sh \ 81 89 # -d $(pwd) \ 82 90 # -i /usr/temp/${LOGNAME}/tropflux_d/ \ … … 86 94 # -idl_cmd idl70 87 95 # 88 # For pinsard on camelot.ipsl.polytechnique.fr or merlin15-c.climserv to use 89 # idl6.4:: 90 # 91 # $ cd ${HOME}/tropflux/ 92 # $ . ./src/project_profile.sh \ 96 # For pinsard on camelot.ipsl.polytechnique.fr or merlin15-c.climserv to use 97 # idl6.4: 98 # 99 # .. code-block:: bash 100 # 101 # cd ${HOME}/tropflux/ 102 # . ./src/project_profile.sh \ 93 103 # -d $(pwd) \ 94 104 # -i /homedata/${LOGNAME}/tropflux_d/ \ … … 125 135 # - fplod 20111104T130726Z cratos (Linux) 126 136 # 127 # * add $ PROJECT/src/test to FER_GO137 # * add ${PROJECT}/src/test to FER_GO 128 138 # 129 139 # - fplod 20111010T072623Z aedon.locean-ipsl.upmc.fr (Darwin) … … 150 160 system=$(uname) 151 161 case "${system}" in 152 AIX|IRIX64)153 echo " www : no specific posix checking"154 ;;155 *)156 set -o posix157 ;;162 AIX|IRIX64) 163 echo " www : no specific posix checking" 164 ;; 165 *) 166 set -o posix 167 ;; 158 168 esac 159 169 unset system … … 173 183 while [ ${#} -gt 0 ] 174 184 do 175 case ${1} in176 -d)177 # directory for application choosen by user (see svn checkout command used)178 directory=${2}179 shift180 ;;181 -i)182 # directory for inputs choosen by user183 indir=${2}184 shift185 ;;186 -o)187 # directory for outputs choosen by user188 outdir=${2}189 shift190 ;;191 -t)192 # directory for temporary outputs choosen by user193 tempdir=${2}194 shift195 ;;196 -s)197 # directory for SAXO tools198 saxo_dir=${2}199 shift200 ;;201 -idl_cmd)202 203 204 205 ;;206 *)207 # other choice208 echo "eee : unknown option ${1}"209 echo "${usage}"210 # nb : no exit because this file should be launched by login process211 ;;212 esac213 # next flag214 shift185 case ${1} in 186 -d) 187 # directory for application choosen by user (see svn checkout command used) 188 directory=${2} 189 shift 190 ;; 191 -i) 192 # directory for inputs choosen by user 193 indir=${2} 194 shift 195 ;; 196 -o) 197 # directory for outputs choosen by user 198 outdir=${2} 199 shift 200 ;; 201 -t) 202 # directory for temporary outputs choosen by user 203 tempdir=${2} 204 shift 205 ;; 206 -s) 207 # directory for SAXO tools 208 saxo_dir=${2} 209 shift 210 ;; 211 -idl_cmd) 212 # command for idl 213 idl_cmd=${2} 214 shift 215 ;; 216 *) 217 # other choice 218 echo "eee : unknown option ${1}" 219 echo "${usage}" 220 # nb : no exit because this file should be launched by login process 221 ;; 222 esac 223 # next flag 224 shift 215 225 done 216 226 unset usage … … 219 229 if [ ! -d ${directory} ] 220 230 then 221 echo " eee : ${directory} not found"222 # nb : no exit because this file should be launched by login process231 echo " eee : ${directory} not found" 232 # nb : no exit because this file should be launched by login process 223 233 fi 224 234 # … … 226 236 if [ ! -x ${directory} ] 227 237 then 228 echo " eee : ${directory} not reachable"229 # nb : no exit because this file should be launched by login process238 echo " eee : ${directory} not reachable" 239 # nb : no exit because this file should be launched by login process 230 240 fi 231 241 # … … 241 251 if [ ${test_path} -ne 0 ] 242 252 then 243 PATH=${suppath}:${PATH}244 export PATH253 PATH=${suppath}:${PATH} 254 export PATH 245 255 else 246 # option bavarde oui/non pas encore implantée ++247 echo "${command} : iii : ${suppath} already in \${PATH}"256 # option bavarde oui/non pas encore implantée ++ 257 echo "${command} : iii : ${suppath} already in \${PATH}" 248 258 fi 249 259 unset test_path … … 256 266 if [ ${test_manpath} -ne 0 ] 257 267 then 258 MANPATH=${suppath}:${MANPATH}259 export MANPATH268 MANPATH=${suppath}:${MANPATH} 269 export MANPATH 260 270 else 261 # option bavarde oui/non pas encore implantée ++262 echo "${command} : iii : ${suppath} already in \${MANPATH}"271 # option bavarde oui/non pas encore implantée ++ 272 echo "${command} : iii : ${suppath} already in \${MANPATH}" 263 273 fi 264 274 unset test_manpath … … 270 280 if [ ! -d ${PROJECT_LOG} ] 271 281 then 272 mkdir -p ${PROJECT_LOG}273 status=${?}274 if [ ${status} -ne 0 ]275 then276 echo "${command} : eee : can not create \${PROJECT_LOG}"277 # nb : no exit because this file should be launched by login process278 else279 echo "${command} : iii : creation of \${PROJECT_LOG}"280 fi281 unset status282 mkdir -p ${PROJECT_LOG} 283 status=${?} 284 if [ ${status} -ne 0 ] 285 then 286 echo "${command} : eee : can not create \${PROJECT_LOG}" 287 # nb : no exit because this file should be launched by login process 288 else 289 echo "${command} : iii : creation of \${PROJECT_LOG}" 290 fi 291 unset status 282 292 fi 283 293 # check for permission on PROJECT_LOG 284 294 if [ ! -x ${PROJECT_LOG} ] 285 295 then 286 echo " eee : ${PROJECT_LOG} not reachable"287 # nb : no exit because this file should be launched by login process296 echo " eee : ${PROJECT_LOG} not reachable" 297 # nb : no exit because this file should be launched by login process 288 298 fi 289 299 # … … 291 301 if [ ! -w ${PROJECT_LOG} ] 292 302 then 293 echo " eee : ${PROJECT_LOG} not writable"294 # nb : no exit because this file shouldreachable be launched by login process303 echo " eee : ${PROJECT_LOG} not writable" 304 # nb : no exit because this file shouldreachable be launched by login process 295 305 fi 296 306 # … … 304 314 if [ ! -d ${PROJECT_ID} ] 305 315 then 306 mkdir -p ${PROJECT_ID}307 echo "${command} : iii : creation of \${PROJECT_ID}"316 mkdir -p ${PROJECT_ID} 317 echo "${command} : iii : creation of \${PROJECT_ID}" 308 318 fi 309 319 # check for permission on PROJECT_ID 310 320 if [ ! -x ${PROJECT_ID} ] 311 321 then 312 echo " eee : ${PROJECT_ID} not reachable"313 # nb : no exit because this file should be launched by login process322 echo " eee : ${PROJECT_ID} not reachable" 323 # nb : no exit because this file should be launched by login process 314 324 fi 315 325 # … … 325 335 if [ ! -x ${PROJECT_OD} ] 326 336 then 327 echo " eee : ${PROJECT_OD} not reachable"328 # nb : no exit because this file should be launched by login process337 echo " eee : ${PROJECT_OD} not reachable" 338 # nb : no exit because this file should be launched by login process 329 339 fi 330 340 if [ ! -w ${PROJECT_OD} ] 331 341 then 332 echo " eee : ${PROJECT_OD} not writable"333 # nb : no exit because this file should be launched by login process342 echo " eee : ${PROJECT_OD} not writable" 343 # nb : no exit because this file should be launched by login process 334 344 fi 335 345 #
Note: See TracChangeset
for help on using the changeset viewer.