Ignore:
Timestamp:
04/26/11 19:05:26 (13 years ago)
Author:
pinsard
Message:

new SAXO and IDL init

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/project_profile.sh

    r2 r9  
    22#+ 
    33# 
    4 # .. program:: pomme_profile.sh 
    5 # 
    6 # ================ 
    7 # pomme_profile.sh 
    8 # ================ 
    9 # 
    10 # ------------------------ 
    11 # define POMME environment 
    12 # ------------------------ 
     4# .. program:: project_profile.sh 
     5# 
     6# .. _project_profile.sh: 
     7# 
     8# ============================================= 
     9# project_profile.sh - define POMME environment 
     10# ============================================= 
    1311# 
    1412# SYNOPSIS 
     
    1715# Online usage:: 
    1816# 
    19 #  $ . ./pomme_profile.sh -d directory -i indir -o outdir -t tempdir 
     17#  $ . ./project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir 
    2018# 
    2119# In ${HOME}/.profile, add the following line:: 
    2220# 
    23 #  . pomme_profile.sh -d directory  -i indir -o outdir -t tempdir 
     21#  . project_profile.sh -d directory  -i indir -o outdir -t tempdir -s saxo_dir 
    2422# 
    2523# DESCRIPTION 
     
    3028# .. option:: -o  <outdir> 
    3129# .. option:: -t  <tempdir> 
     30# .. option:: -s  <saxo_dir> 
    3231# 
    3332# define POMME environment 
    3433# 
    35 # ${POMME} is the base directory of tools. 
    36 # 
    37 # ${POMME_LOG} is the directory where log files will be written. 
    38 # 
    39 # ${POMME_ID} is the directory where input files must be. 
    40 # 
    41 # ${POMME_OD} is the directory where output files will be written. 
    42 # 
    43 # PATH is completed with ${POMME}. 
     34# ${PROJECT} is the base directory of tools. 
     35# 
     36# ${PROJECT_LOG} is the directory where log files will be written. 
     37# 
     38# ${PROJECT_ID} is the directory where input files must be. 
     39# 
     40# ${PROJECT_OD} is the directory where output files will be written. 
     41# 
     42# ${SAXO_DIR} is the base directory of SAXO tools. 
     43# 
     44# PATH is completed with ${PROJECT}. 
    4445# 
    4546# SEE ALSO 
     
    4849# for IDL/GDL environment : 
    4950# 
    50 # :program:`pomme_startup.pro` 
     51# :ref:`project_init.pro` 
     52# :ref:`cm_project.pro` 
    5153# 
    5254# EXAMPLES 
     
    5658# 
    5759#  $ cd /usr/home/fplod/incas/pomme/pomme_ws/ 
    58 #  $ . ./src/pomme_profile.sh \ 
     60#  $ . ./src/project_profile.sh \ 
    5961#    -d $(pwd) \ 
    6062#    -i /usr/temp/${LOGNAME}/pomme_d/ \ 
    6163#    -o /usr/temp/${LOGNAME}/pomme_d/ \ 
    62 #    -t /usr/temp/${LOGNAME}/log/ 
    63 # 
    64 # For fplod on zeus.locean-ipsl.umpc.fr:: 
     64#    -t /usr/temp/${LOGNAME}/log/ \ 
     65#    -s /usr/home/fplod/SAXO_DIR/ 
     66# 
     67# For fplod on cratos.locean-ipsl.umpc.fr:: 
    6568# 
    6669#  $ cd ${HOME}/incas/pomme/pomme_ws/ 
    67 #  $ . ./src/pomme_profile.sh \ 
     70#  $ . ./src/project_profile.sh \ 
    6871#    -d $(pwd) \ 
    6972#    -i /usr/temp/${LOGNAME}/pomme_d/ \ 
    7073#    -o /usr/temp/${LOGNAME}/pomme_d/ \ 
    71 #    -t /usr/temp/${LOGNAME}/log/ 
     74#    -t /usr/temp/${LOGNAME}/log/ \ 
     75#    -s ${HOME}/SAXO_DIR/ 
    7276# 
    7377# For pinsard on camelot.ipsl.polytechnique.fr or merlin15-c.climserv:: 
    7478# 
    7579#  $ cd ${HOME}/pomme/ 
    76 #  $ . ./src/pomme_profile.sh \ 
     80#  $ . ./src/project_profile.sh \ 
    7781#   -d $(pwd) \ 
    7882#   -i /homedata/${LOGNAME}/pomme_d/ \ 
    7983#   -o /homedata/${LOGNAME}/pomme_d/ \ 
    80 #   -t /homedata/${LOGNAME}/log/ 
     84#   -t /homedata/${LOGNAME}/log/ \ 
     85#   -s ${HOME}/SAXO_DIR/ 
    8186# 
    8287# TODO 
     
    8994# ++ besoin de posix 
    9095# 
    91 # ++ pas de MANPATH defini par défaut sur zeus et cerbere 
    92 # 
    93 # define IDL_STARTUP 
     96# ++ pas de MANPATH defini par défaut sur cratos  et cerbere 
    9497# 
    9598# EVOLUTIONS 
    9699# ========== 
     100# 
     101# - fplod 20110426T151058Z cratos.locean-ipsl.upmc.fr (Linux) 
     102# 
     103#   * add IDL and  SAXO env. 
     104#   * replace POMME by PROJECT 
     105#   * replace zeus by cratos 
    97106# 
    98107# - fplod 20101118T171653Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    115124# 
    116125# as this script might be launch in .profile, command is forced. 
    117 command=pomme_profile.sh 
    118 # 
    119 usage=" Usage : ${command} -d directory -i indir -o outdir -t tempdir" 
     126command=project_profile.sh 
     127# 
     128usage=" Usage : ${command} -d directory -i indir -o outdir -t tempdir -s saxo_dir" 
    120129# 
    121130set +u 
     
    143152         shift 
    144153      ;; 
     154      -s) 
     155         saxo_dir=${2} 
     156         shift 
     157      ;; 
    145158      *) 
    146159         # other choice 
     
    169182fi 
    170183# 
    171 POMME=${directory} 
    172 export POMME 
     184PROJECT=${directory} 
     185export PROJECT 
    173186unset drectory 
    174187# 
    175 # add POMME tools to PATH 
     188# add PROJECT tools to PATH 
    176189# if not already done 
    177 suppath=$(echo ${POMME}/src | tr -s "/") 
     190suppath=$(echo ${PROJECT}/src | tr -s "/") 
    178191echo ${PATH} | grep -q "${suppath}:" 
    179192test_path=${?} 
     
    188201unset test_path 
    189202# 
    190 # add POMME manuals to MANPATH 
     203# add PROJECT manuals to MANPATH 
    191204# if not already done 
    192 suppath=$(echo ${POMME}/doc/man | tr -s "/") 
     205suppath=$(echo ${PROJECT}/doc/man | tr -s "/") 
    193206echo ${MANPATH} | grep -q "${suppath}:" 
    194207test_manpath=${?} 
     
    204217unset suppath 
    205218# 
    206 POMME_LOG=${tempdir} 
    207 export POMME_LOG 
     219PROJECT_LOG=${tempdir} 
     220export PROJECT_LOG 
    208221unset tempdir 
    209 if [ ! -d ${POMME_LOG} ] 
    210 then 
    211    mkdir -p ${POMME_LOG} 
     222if [ ! -d ${PROJECT_LOG} ] 
     223then 
     224   mkdir -p ${PROJECT_LOG} 
    212225   status=${?} 
    213226   if [ ${status} -ne 0 ] 
     
    216229      # nb : no exit because this file should be launched by login process 
    217230   else 
    218       echo "${command} : iii : creation of \${POMME_LOG}" 
     231      echo "${command} : iii : creation of \${PROJECT_LOG}" 
    219232   fi 
    220233   unset status 
    221234fi 
    222 # check for permission on POMME_LOG 
    223 if [ ! -x ${POMME_LOG} ] 
    224 then 
    225    echo " eee : ${POMME_LOG} not reachable" 
    226    # nb : no exit because this file should be launched by login process 
    227 fi 
    228 # 
    229 # check for permission on POMME_LOG 
    230 if [ ! -w ${POMME_LOG} ] 
    231 then 
    232    echo " eee : ${POMME_LOG} not writable" 
     235# check for permission on PROJECT_LOG 
     236if [ ! -x ${PROJECT_LOG} ] 
     237then 
     238   echo " eee : ${PROJECT_LOG} not reachable" 
     239   # nb : no exit because this file should be launched by login process 
     240fi 
     241# 
     242# check for permission on PROJECT_LOG 
     243if [ ! -w ${PROJECT_LOG} ] 
     244then 
     245   echo " eee : ${PROJECT_LOG} not writable" 
    233246   # nb : no exit because this file shouldreachable be launched by login process 
    234247fi 
     
    238251# 
    239252# io directories 
    240 POMME_ID=${indir} 
    241 export POMME_ID 
     253PROJECT_ID=${indir} 
     254export PROJECT_ID 
    242255unset indir 
    243 if [ ! -d ${POMME_ID} ] 
    244 then 
    245    mkdir -p ${POMME_ID} 
    246    echo "${command} : iii : creation of \${POMME_ID}" 
    247 fi 
    248 # check for permission on POMME_ID 
    249 if [ ! -x ${POMME_ID} ] 
    250 then 
    251    echo " eee : ${POMME_ID} not reachable" 
    252    # nb : no exit because this file should be launched by login process 
    253 fi 
    254 # 
    255 POMME_OD=${outdir} 
    256 export POMME_OD 
     256if [ ! -d ${PROJECT_ID} ] 
     257then 
     258   mkdir -p ${PROJECT_ID} 
     259   echo "${command} : iii : creation of \${PROJECT_ID}" 
     260fi 
     261# check for permission on PROJECT_ID 
     262if [ ! -x ${PROJECT_ID} ] 
     263then 
     264   echo " eee : ${PROJECT_ID} not reachable" 
     265   # nb : no exit because this file should be launched by login process 
     266fi 
     267# 
     268PROJECT_OD=${outdir} 
     269export PROJECT_OD 
    257270unset outdir 
    258 if [ ! -d ${POMME_OD} ] 
    259 then 
    260     mkdir -p ${POMME_OD} 
    261     echo "${command} : iii : creation of \${POMME_OD}" 
    262 fi 
    263 # check for permission on POMME_OD 
    264 if [ ! -x ${POMME_OD} ] 
    265 then 
    266    echo " eee : ${POMME_OD} not reachable" 
    267    # nb : no exit because this file should be launched by login process 
    268 fi 
    269 if [ ! -w ${POMME_OD} ] 
    270 then 
    271    echo " eee : ${POMME_OD} not writable" 
    272    # nb : no exit because this file should be launched by login process 
    273 fi 
    274 # 
     271if [ ! -d ${PROJECT_OD} ] 
     272then 
     273    mkdir -p ${PROJECT_OD} 
     274    echo "${command} : iii : creation of \${PROJECT_OD}" 
     275fi 
     276# check for permission on PROJECT_OD 
     277if [ ! -x ${PROJECT_OD} ] 
     278then 
     279   echo " eee : ${PROJECT_OD} not reachable" 
     280   # nb : no exit because this file should be launched by login process 
     281fi 
     282if [ ! -w ${PROJECT_OD} ] 
     283then 
     284   echo " eee : ${PROJECT_OD} not writable" 
     285   # nb : no exit because this file should be launched by login process 
     286fi 
     287# 
     288SAXO_DIR=${saxo_dir} 
     289export SAXO_DIR 
     290# 
     291# IDL startup 
     292IDL_STARTUP=${PROJECT}/src/project_init.pro 
     293export IDL_STARTUP 
    275294# end 
    276295unset command 
Note: See TracChangeset for help on using the changeset viewer.