Changeset 17 for trunk/geomag_profile.sh


Ignore:
Timestamp:
03/21/07 14:18:07 (17 years ago)
Author:
pinsard
Message:

remove xxx_oneplot.pro and for_createpro.pro which are not supposed to be here : They interfere with xxx temporary files in myuniquetmpdir

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/geomag_profile.sh

    r10 r17  
    1 # !/bin/sh 
     1# !/bin/sh -xv 
    22# 
    33# module : 
     
    66# usage : 
    77# online usage 
    8 # $ . geomag_profile.sh 
     8# $ . geomag_profile.sh -d directory 
    99# 
    1010# in ${HOME}/.profile, add the following line 
    11 # . geomag_profile.sh 
     11# . geomag_profile.sh -d directory 
     12# 
     13# examples : 
     14# for fplod, on aedon.locean-ipsl.upmc.fr 
     15# $ cd /usr/home/fplod/incas/geomag/geomag_ws 
     16# $  . geomag_profile.sh -d /usr/home/fplod/incas/geomag/geomag_ws/ 
     17# for reee522 on rhodes.idris.fr 
     18# $ cd ${HOME}/incas/geomag/geomag_ws/ 
     19# $ . geomag_profile.sh -d ${HOME}/incas/geomag/geomag_ws/ 
    1220# 
    1321# original location 
     
    1826# ++ machine dependant 
    1927# ++ besoin de posix 
     28# ++ pas de MANPATH defini par déut sur zeus 
     29# fplod 2007-03-13T16:12:41Z zeus.locean-ipsl.upmc.fr (Linux) 
     30# add creation of $GEOMAG_ID and $GEOMAG_OD if they don't exist 
    2031# reee522 2006-11-23T11:41:41Z rhodes (IRIX64) 
    2132# pas de set -o posix sur rhodes (IRIX64) 
     
    2435# creation 
    2536# 
     37# 
     38command=geomag_profile.sh 
     39# 
     40usage=" Usage : ${command} -d directory" 
     41# 
     42while [ ! -z "${1}" ] # ++ pb bash 
     43do 
     44 case ${1} in 
     45 -d) # directory choosen by user 
     46  directory=${2} 
     47  shift 
     48 ;; 
     49 *) # other choice 
     50  echo "${usage}" 
     51  # nb : no exit because this file should be launched by login process 
     52 ;; 
     53 esac 
     54 shift # next flag 
     55done 
     56 
     57# check for ${directory} 
     58if [ ! -d ${directory} ] 
     59then 
     60 echo " eee : ${directory} not found" 
     61 # nb : no exit because this file should be launched by login process 
     62fi 
     63# 
     64# check for permission on directory 
     65if [ ! -x ${directory} ] 
     66then 
     67 echo " eee : ${directory} not reachable" 
     68 # nb : no exit because this file should be launched by login process 
     69fi 
    2670# 
    2771set -u 
     
    3680esac 
    3781# 
    38 command='geomag_profile.sh' 
    3982# 
    40 GEOMAG=${HOME}/incas/geomag/ # ++   
    41 # test if $GEOMAG available 
    42 if [ ! -d ${GEOMAG} ] 
    43 then 
    44  echo "${command} : eee : ${GEOMAG} directory not available" 
    45  # nb : no exit because this file should be launched by login process 
    46  # ++ how to worn user 
    47 fi 
     83GEOMAG=${directory} 
     84export GEOMAG 
    4885# 
    4986# add GEOMAG tools to PATH 
     
    82119GEOMAG_ID=${HOME}/geomag_d/ 
    83120export GEOMAG_ID 
     121if [ ! -d ${GEOMAG_ID} ]  
     122then 
     123  mkdir -p ${GEOMAG_ID} 
     124  echo "${command} : iii : creation of \${GEOMAG_ID}" 
     125fi  
    84126GEOMAG_OD=${HOME}/geomag_d/ 
    85127export GEOMAG_OD 
     128if [ ! -d ${GEOMAG_ID} ] 
     129then 
     130  mkdir -p ${GEOMAG_OD} 
     131  echo "${command} : iii : creation of \${GEOMAG_OD}" 
     132fi 
    86133# 
    87134# end 
    88135# nb : no exit because this file should be launched by login process 
    89 # ++ how to worn user 
Note: See TracChangeset for help on using the changeset viewer.