Changeset 77 for trunk


Ignore:
Timestamp:
04/13/10 15:11:52 (14 years ago)
Author:
pinsard
Message:

indent shell scripts

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/adm/extract_rst.sh

    r74 r77  
    169169system=$(uname) 
    170170case "${system}" in 
    171  AIX|IRIX64) 
    172   echo " www : no specific posix checking" 
    173  ;; 
    174  *) 
    175   set -o posix 
    176  ;; 
     171   AIX|IRIX64) 
     172      echo " www : no specific posix checking" 
     173   ;; 
     174   *) 
     175      set -o posix 
     176   ;; 
    177177esac 
    178178# 
     
    187187if [ ${#} -lt ${minargcount} ] 
    188188then 
    189  echo "eee : not enought arguments" 
    190  echo "${usage}" 
    191  exit 1 
     189   echo "eee : not enought arguments" 
     190   echo "${usage}" 
     191   exit 1 
    192192fi 
    193193# 
     
    197197while [ ! -z "${1}" ] 
    198198do 
    199  case ${1} in 
    200  -i) 
    201   filein=${2} 
    202   shift 
    203  ;; 
    204  -o) 
    205   fileout=${2} 
    206   shift 
    207  ;; 
    208  -l) 
    209   language=${2} 
    210   shift 
    211  ;; 
    212  -h)  
    213   echo "${usage}" 
    214   exit 1 
    215  ;; 
    216  *) 
    217   echo "eee : unknown option ${1}" 
    218   echo "${usage}" 
    219   exit 1 
    220  ;; 
    221  esac 
    222  shift # next flag 
    223  done 
     199   case ${1} in 
     200      -i) 
     201         filein=${2} 
     202         shift 
     203      ;; 
     204      -o) 
     205         fileout=${2} 
     206         shift 
     207      ;; 
     208      -l) 
     209         language=${2} 
     210         shift 
     211      ;; 
     212      -h)  
     213         echo "${usage}" 
     214         exit 1 
     215      ;; 
     216      *) 
     217         echo "eee : unknown option ${1}" 
     218         echo "${usage}" 
     219         exit 1 
     220      ;; 
     221   esac 
     222   shift # next flag 
     223done 
    224224# 
    225225set -u 
     
    228228# 
    229229case "${language}" in 
    230 fortran) 
    231 awkblockstart="^C\+$" 
    232 awkblockend="^C-$" 
    233 sedblockstart="^C+$" 
    234 sedblockend="^C-$" 
    235 comment="^C" 
    236 ;; 
    237 F90) 
    238 awkblockstart="^!\+$" 
    239 awkblockend="^!-$" 
    240 sedblockstart="^!+$" 
    241 sedblockend="^!-$" 
    242 comment="^!" 
    243 ;; 
    244 IDL) 
    245 awkblockstart="^;\+$" 
    246 awkblockend="^;-$" 
    247 sedblockstart="^;+$" 
    248 sedblockend="^;-$" 
    249 comment="^;" 
    250 ;; 
    251 xml) 
    252 awkblockstart="^<!--rst$" 
    253 awkblockend="-->$" 
    254 sedblockstart="^<!--rst$" 
    255 sedblockend="-->$" 
    256 comment="" 
    257 ;; 
    258 sh) 
    259 # iii : awk '/^\#\+/,/^\#\-/' $file 
    260 awkblockstart="^\#\+$" 
    261 awkblockend="^\#\-$" 
    262 sedblockstart="^#+" 
    263 sedblockend="^#-" 
    264 comment="^#" 
    265 ;; 
    266 dot|php) 
    267 awkblockstart="^\/\*rst$" 
    268 awkblockend="*\/" 
    269 sedblockstart="^\/\*rst$" 
    270 sedblockend="^\*\/" 
    271 comment="" 
    272 ;; 
    273 matlab) 
    274 awkblockstart="^%\+$" 
    275 awkblockend="^%-$" 
    276 sedblockstart="^%+$" 
    277 sedblockend="^%-$" 
    278 comment="^%" 
    279 ;; 
    280 *) 
    281  echo "eee : ${language} not implemented" 
    282  exit 1 
    283 ;; 
     230   fortran) 
     231      awkblockstart="^C\+$" 
     232      awkblockend="^C-$" 
     233      sedblockstart="^C+$" 
     234      sedblockend="^C-$" 
     235      comment="^C" 
     236   ;; 
     237   F90) 
     238      awkblockstart="^!\+$" 
     239      awkblockend="^!-$" 
     240      sedblockstart="^!+$" 
     241      sedblockend="^!-$" 
     242      comment="^!" 
     243   ;; 
     244   IDL) 
     245      awkblockstart="^;\+$" 
     246      awkblockend="^;-$" 
     247      sedblockstart="^;+$" 
     248      sedblockend="^;-$" 
     249      comment="^;" 
     250   ;; 
     251   xml) 
     252      awkblockstart="^<!--rst$" 
     253      awkblockend="-->$" 
     254      sedblockstart="^<!--rst$" 
     255      sedblockend="-->$" 
     256      comment="" 
     257   ;; 
     258   sh) 
     259      # iii : awk '/^\#\+/,/^\#\-/' $file 
     260      awkblockstart="^\#\+$" 
     261      awkblockend="^\#\-$" 
     262      sedblockstart="^#+" 
     263      sedblockend="^#-" 
     264      comment="^#" 
     265   ;; 
     266   dot|php) 
     267      awkblockstart="^\/\*rst$" 
     268      awkblockend="*\/" 
     269      sedblockstart="^\/\*rst$" 
     270      sedblockend="^\*\/" 
     271      comment="" 
     272   ;; 
     273   matlab) 
     274      awkblockstart="^%\+$" 
     275      awkblockend="^%-$" 
     276      sedblockstart="^%+$" 
     277      sedblockend="^%-$" 
     278      comment="^%" 
     279   ;; 
     280   *) 
     281      echo "eee : ${language} not implemented" 
     282      exit 1 
     283   ;; 
    284284esac 
    285285# 
     
    293293if [ ! -s /tmp/${$}_1 ] 
    294294then 
    295  rm /tmp/${$}_0 /tmp/${$}_1 
    296  echo "iii : no rst comments in ${filein}" 
    297  exit 1 
     295   rm /tmp/${$}_0 /tmp/${$}_1 
     296   echo "iii : no rst comments in ${filein}" 
     297   exit 1 
    298298fi 
    299299# 
     
    305305if [ "${comment}" != "" ] 
    306306then 
    307  sedcmd="sed -e \"s/${comment}//\" /tmp/${$}_2 > /tmp/${$}_3" 
    308  eval ${sedcmd} 
    309  # suppress first blank 
    310  cp /tmp/${$}_3 /tmp/${$}_2 
    311  sed -e "s/^ //" /tmp/${$}_2 > /tmp/${$}_3 
    312  cp /tmp/${$}_3 ${fileout} 
     307   sedcmd="sed -e \"s/${comment}//\" /tmp/${$}_2 > /tmp/${$}_3" 
     308   eval ${sedcmd} 
     309   # suppress first blank 
     310   cp /tmp/${$}_3 /tmp/${$}_2 
     311   sed -e "s/^ //" /tmp/${$}_2 > /tmp/${$}_3 
     312   cp /tmp/${$}_3 ${fileout} 
    313313else 
    314  cp /tmp/${$}_2 ${fileout} 
     314   cp /tmp/${$}_2 ${fileout} 
    315315fi 
    316316# 
  • trunk/adm/install.sh

    r67 r77  
    4747system=$(uname) 
    4848case "${system}" in 
    49  AIX|IRIX64) 
    50   echo " www : no specific posix checking" 
    51  ;; 
    52  *) 
    53   set -o posix 
    54  ;; 
     49   AIX|IRIX64) 
     50      echo " www : no specific posix checking" 
     51   ;; 
     52   *) 
     53      set -o posix 
     54   ;; 
    5555esac 
    5656# 
     
    6565if [ ${#} -lt ${minargcount} ] 
    6666then 
    67  echo "eee : not enought arguments" 
    68  echo "${usage}" 
    69  exit 1 
     67   echo "eee : not enought arguments" 
     68   echo "${usage}" 
     69   exit 1 
    7070fi 
    7171# 
     
    7777while [ ! -z "${1}" ] 
    7878do 
    79  case ${1} in 
    80  -w) 
    81   dirwww=${2} 
    82   shift 
    83  ;; 
    84  -p) 
    85   dirpublish=${2} 
    86   shift 
    87  ;; 
    88  -u ) 
    89   urlpublish=${2} 
    90   shift 
    91  ;; 
    92  -l ) 
    93   login=${2} 
    94   shift 
    95  ;; 
    96  esac 
    97  shift # next flag 
     79   case ${1} in 
     80      -w) 
     81         dirwww=${2} 
     82         shift 
     83      ;; 
     84      -p) 
     85         dirpublish=${2} 
     86         shift 
     87      ;; 
     88      -u) 
     89         urlpublish=${2} 
     90         shift 
     91      ;; 
     92      -l) 
     93         login=${2} 
     94         shift 
     95      ;; 
     96   esac 
     97   shift # next flag 
    9898done 
    9999# 
     
    104104answer=${1:-" "} 
    105105case ${answer} in 
    106  y|Y|n|N) 
    107  ;; 
    108  *) 
    109  if [ "${dirpublish}" != "none" ] 
    110  then 
    111   echo "Do you want to install ${dirwww} on ${dirpublish} (y|[n]) ?" 
    112   read answer 
    113  fi 
    114  if [ "${urlpublish}" != "none" ] 
    115  then 
    116   echo "Do you want to install ${dirwww} on ${urlpublish} (y|[n]) ?" 
    117   read answer 
    118  fi 
    119  ;; 
     106   y|Y|n|N) 
     107   ;; 
     108   *) 
     109      if [ "${dirpublish}" != "none" ] 
     110      then 
     111         echo "Do you want to install ${dirwww} on ${dirpublish} (y|[n]) ?" 
     112         read answer 
     113      fi 
     114      if [ "${urlpublish}" != "none" ] 
     115      then 
     116         echo "Do you want to install ${dirwww} on ${urlpublish} (y|[n]) ?" 
     117         read answer 
     118      fi 
     119   ;; 
    120120esac 
    121121# 
    122122case ${answer} in 
    123  y|Y) 
    124   if [ "${dirpublish}" != "none" ] 
    125   then 
    126    # copy of ${dirwww} on $dirpublish 
    127    echo "iii : update of ${dirpublish}" 
    128    rsync -av --exclude=".DS_Store" -e ssh ${dirwww}/ ${dirpublish} 
    129    # detect if in dirpublish following this pattern [USER@]HOST:SRC, HOST 
    130    # is cerbere.locean-ipsl.upmc.fr. If so, a specific update is launched 
    131    userhost=${dirpublish%%:*} 
    132    host=${userhost##*@} 
    133    if [ ${login} = "none" ] 
    134    then 
    135     user=${userhost%%@*} 
    136    else 
    137     user=${login} 
    138    fi 
    139    if [ "${host}" = "cerbere.locean-ipsl.upmc.fr" ] 
    140    then 
    141     wget -q "http://intranet.locean-ipsl.upmc.fr/persoweb/?fastupdate=1&user=${user}" -O /dev/null 
    142    fi 
    143   else 
    144    # urlpublish=http://www.locean-ipsl.upmc.fr/~ginette/produit 
    145    dirpublish=${urlpublish##*~} 
    146    cd ${dirwww} 
    147    #lftp -e "mirror -R . ${dirpublish};quit" -u ${LOGNAME} skyros.locean-ipsl.upmc.fr 
    148    lftp -e "mirror -R . ${dirpublish};quit" -u ${LOGNAME} www.locean-ipsl.upmc.fr 
    149 # pour acmo a la main ++ 
    150 #++lftp -e 'mirror -R . acmo/nouveaux/;quit' -u fplod www.locean-ipsl.upmc.fr 
    151  
    152    # ++ log 
    153   fi 
    154  ;; 
    155  *) 
    156   echo "no update of ${dirpublish} or ${urlpublish}" 
    157  ;; 
     123   y|Y) 
     124      if [ "${dirpublish}" != "none" ] 
     125      then 
     126         # copy of ${dirwww} on $dirpublish 
     127         echo "iii : update of ${dirpublish}" 
     128         rsync -av --exclude=".DS_Store" -e ssh ${dirwww}/ ${dirpublish} 
     129         # detect if in dirpublish following this pattern [USER@]HOST:SRC, HOST 
     130         # is cerbere.locean-ipsl.upmc.fr. If so, a specific update is launched 
     131         userhost=${dirpublish%%:*} 
     132         host=${userhost##*@} 
     133         if [ ${login} = "none" ] 
     134         then 
     135            user=${userhost%%@*} 
     136         else 
     137            user=${login} 
     138         fi 
     139         if [ "${host}" = "cerbere.locean-ipsl.upmc.fr" ] 
     140         then 
     141            wget -q "http://intranet.locean-ipsl.upmc.fr/persoweb/?fastupdate=1&user=${user}" -O /dev/null 
     142         fi 
     143      else 
     144         # urlpublish=http://www.locean-ipsl.upmc.fr/~ginette/produit 
     145         dirpublish=${urlpublish##*~} 
     146         cd ${dirwww} 
     147         #lftp -e "mirror -R . ${dirpublish};quit" -u ${LOGNAME} skyros.locean-ipsl.upmc.fr 
     148         lftp -e "mirror -R . ${dirpublish};quit" -u ${LOGNAME} www.locean-ipsl.upmc.fr 
     149         # pour acmo a la main ++ 
     150         #++lftp -e 'mirror -R . acmo/nouveaux/;quit' -u fplod www.locean-ipsl.upmc.fr 
     151         # ++ log 
     152      fi 
     153   ;; 
     154   *) 
     155      echo "no update of ${dirpublish} or ${urlpublish}" 
     156   ;; 
    158157esac 
    159158# 
  • trunk/adm/linkchecker.sh

    r67 r77  
    7979system=$(uname) 
    8080case "${system}" in 
    81  AIX|IRIX64) 
    82   echo " www : no specific posix checking" 
    83  ;; 
    84  *) 
    85   set -o posix 
    86  ;; 
     81   AIX|IRIX64) 
     82      echo " www : no specific posix checking" 
     83   ;; 
     84   *) 
     85      set -o posix 
     86   ;; 
    8787esac 
    8888command=$(basename ${0}) 
     
    9696if [ ${#} -lt ${minargcount} ] 
    9797then 
    98   echo "eee : not enought arguments" 
    99   echo "${usage}" 
    100   exit 1 
     98   echo "eee : not enought arguments" 
     99   echo "${usage}" 
     100   exit 1 
    101101fi 
    102102# 
     
    105105while [ ! -z "${1}" ] 
    106106do 
    107  case ${1} in 
    108  -d) 
    109   idircheck=$(( ${idircheck} + 1 )) 
    110   dircheck[${idircheck}]=$(cd ${2};pwd) 
    111   shift 
    112  ;; 
    113  -u) 
    114   iurlcheck=$(( ${iurlcheck} + 1 )) 
    115   urlcheck[${iurlcheck}]=${2} 
    116   shift 
    117  ;; 
    118  esac 
    119  shift # next flag 
     107   case ${1} in 
     108      -d) 
     109         idircheck=$(( ${idircheck} + 1 )) 
     110         dircheck[${idircheck}]=$(cd ${2};pwd) 
     111         shift 
     112      ;; 
     113      -u) 
     114         iurlcheck=$(( ${iurlcheck} + 1 )) 
     115         urlcheck[${iurlcheck}]=${2} 
     116         shift 
     117      ;; 
     118   esac 
     119   shift # next flag 
    120120done 
    121121# 
     
    136136   if [ ${status} -ne 0 ] 
    137137   then 
    138     echo "${command} : eee : ${commandcheck} unavailable" 
    139     exit 1 
     138      echo "${command} : eee : ${commandcheck} unavailable" 
     139      exit 1 
    140140   fi 
    141141   optcheck="--anchors --recursion-level=-1" 
  • trunk/src/dlogd.sh

    r75 r77  
    6060system=$(uname) 
    6161case "${system}" in 
    62 AIX|IRIX64) 
    63   echo " www : no specific posix checking" 
    64 ;; 
    65 *) 
    66   set -o posix 
    67 ;; 
     62   AIX|IRIX64) 
     63      echo " www : no specific posix checking" 
     64   ;; 
     65   *) 
     66      set -o posix 
     67   ;; 
    6868esac 
    6969unset system 
     
    8282if [ "${IRCAAM_LOG}" = "" ] 
    8383then 
    84  echo " eee : \${IRCAAM_LOG} not defined" 
    85  exit 1 
     84   echo " eee : \${IRCAAM_LOG} not defined" 
     85   exit 1 
    8686fi 
    8787# 
     
    8989if [ ! -d ${IRCAAM_LOG} ] 
    9090then 
    91  echo " eee : ${IRCAAM_LOG} not found" 
    92  exit 1 
     91   echo " eee : ${IRCAAM_LOG} not found" 
     92   exit 1 
    9393fi 
    9494# 
     
    9696if [ ! -x ${IRCAAM_LOG} ] 
    9797then 
    98  echo " eee : ${IRCAAM_LOG} not reachable" 
    99  exit 1 
     98   echo " eee : ${IRCAAM_LOG} not reachable" 
     99   exit 1 
    100100fi 
    101101# check for write permission on IRCAAM_LOG 
    102102if [ ! -w ${IRCAAM_LOG} ] 
    103103then 
    104  echo " eee : ${IRCAAM_LOG} not writable" 
    105  exit 1 
     104   echo " eee : ${IRCAAM_LOG} not writable" 
     105   exit 1 
    106106fi 
    107107# 
     
    111111if [ ${tmp} -eq 0 ] 
    112112then 
    113  if [ "${log}" = "" ] 
    114  then 
    115   echo "${command} : eee : no release of ${IRCAAM_LOG}/${1}.log" >&2 
    116   exit 1 
    117  else 
    118   # destruction du fichier ${log} 
    119   /bin/rm -i ${log} 
    120   exit 0 
    121  fi 
     113   if [ "${log}" = "" ] 
     114   then 
     115      echo "${command} : eee : no release of ${IRCAAM_LOG}/${1}.log" >&2 
     116      exit 1 
     117   else 
     118      # destruction du fichier ${log} 
     119      /bin/rm -i ${log} 
     120      exit 0 
     121   fi 
    122122else 
    123  exit 1 
     123   exit 1 
    124124fi 
  • trunk/src/elogd.sh

    r75 r77  
    6161system=$(uname) 
    6262case "${system}" in 
    63 AIX|IRIX64) 
    64   echo " www : no specific posix checking" 
    65 ;; 
    66 *) 
    67   set -o posix 
    68 ;; 
     63   AIX|IRIX64) 
     64      echo " www : no specific posix checking" 
     65   ;; 
     66   *) 
     67      set -o posix 
     68   ;; 
    6969esac 
    7070unset system 
     
    7676if [ ! "${EDITOR}" ] 
    7777then 
    78  echo " ${command} : eee : EDITOR undefined" >&2 
    79  exit 1 
     78   echo " ${command} : eee : EDITOR undefined" >&2 
     79   exit 1 
    8080fi 
    8181if [ "${1}" = "" ] 
    8282then 
    83  echo "${command} : eee : 1st parameter missing" >&2 
    84  exit 1 
     83   echo "${command} : eee : 1st parameter missing" >&2 
     84   exit 1 
    8585fi 
    8686# 
     
    8888if [ "${IRCAAM_LOG}" = "" ] 
    8989then 
    90  echo " eee : \${IRCAAM_LOG} not defined" 
    91  exit 1 
     90   echo " eee : \${IRCAAM_LOG} not defined" 
     91   exit 1 
    9292fi 
    9393# 
     
    9595if [ ! -d ${IRCAAM_LOG} ] 
    9696then 
    97  echo " eee : ${IRCAAM_LOG} not found" 
    98  exit 1 
     97   echo " eee : ${IRCAAM_LOG} not found" 
     98   exit 1 
    9999fi 
    100100# 
     
    102102if [ ! -x ${IRCAAM_LOG} ] 
    103103then 
    104  echo " eee : ${IRCAAM_LOG} not reachable" 
    105  exit 1 
     104   echo " eee : ${IRCAAM_LOG} not reachable" 
     105   exit 1 
    106106fi 
    107107# 
     
    111111if [ ${tmp} -eq 0 ] 
    112112then 
    113  if [ "${log}" = "" ] 
    114  then 
    115   echo "${command} : eee : no release of ${IRCAAM_LOG}/${1}.log" >&2 
    116   exit 1 
    117  else 
    118   # edit 
    119   ${EDITOR} ${log} 
    120   exit 0 
    121  fi 
     113   if [ "${log}" = "" ] 
     114   then 
     115      echo "${command} : eee : no release of ${IRCAAM_LOG}/${1}.log" >&2 
     116      exit 1 
     117   else 
     118      # edit 
     119      ${EDITOR} ${log} 
     120      exit 0 
     121   fi 
    122122else 
    123  exit 1 
     123   exit 1 
    124124fi 
  • trunk/src/ircaam_profile.sh

    r75 r77  
    103103system=$(uname) 
    104104case "${system}" in 
    105  AIX|IRIX64) 
    106   echo " www : no specific posix checking" 
    107  ;; 
    108  *) 
    109   set -o posix 
    110  ;; 
     105   AIX|IRIX64) 
     106      echo " www : no specific posix checking" 
     107   ;; 
     108   *) 
     109    set -o posix 
     110   ;; 
    111111esac 
    112112unset system 
     
    123123while [ ! -z "${1}" ] # ++ pb bash 
    124124do 
    125  case ${1} in 
    126  -d) # directory for application choosen by user (see svn checkout command used) 
    127   directory=${2} 
    128   shift 
    129  ;; 
    130  -i) # directory for inputs choosen by user 
    131   indir=${2} 
    132   shift 
    133  ;; 
    134  -o) # directory for outputs choosen by user 
    135   outdir=${2} 
    136   shift 
    137  ;; 
    138  -t) # directory for temporary outputs choosen by user 
    139   tempdir=${2} 
    140   shift 
    141  ;; 
    142  *) # other choice 
    143   echo "eee : unknown option ${1}" 
    144   echo "${usage}" 
    145   # nb : no exit because this file should be launched by login process 
    146  ;; 
    147  esac 
    148  shift # next flag 
     125   case ${1} in 
     126      -d) # directory for application choosen by user (see svn checkout command used) 
     127         directory=${2} 
     128         shift 
     129      ;; 
     130      -i) # directory for inputs choosen by user 
     131         indir=${2} 
     132         shift 
     133      ;; 
     134      -o) # directory for outputs choosen by user 
     135         outdir=${2} 
     136         shift 
     137      ;; 
     138      -t) # directory for temporary outputs choosen by user 
     139         tempdir=${2} 
     140         shift 
     141      ;; 
     142      *) # other choice 
     143         echo "eee : unknown option ${1}" 
     144         echo "${usage}" 
     145         # nb : no exit because this file should be launched by login process 
     146      ;; 
     147   esac 
     148   shift # next flag 
    149149done 
    150150unset usage 
     
    153153if [ ! -d ${directory} ] 
    154154then 
    155  echo " eee : ${directory} not found" 
    156  # nb : no exit because this file should be launched by login process 
     155   echo " eee : ${directory} not found" 
     156   # nb : no exit because this file should be launched by login process 
    157157fi 
    158158# 
     
    160160if [ ! -x ${directory} ] 
    161161then 
    162  echo " eee : ${directory} not reachable" 
    163  # nb : no exit because this file should be launched by login process 
     162   echo " eee : ${directory} not reachable" 
     163   # nb : no exit because this file should be launched by login process 
    164164fi 
    165165# 
     
    223223if [ ! -x ${IRCAAM_LOG} ] 
    224224then 
    225  echo " eee : ${IRCAAM_LOG} not reachable" 
    226  # nb : no exit because this file should be launched by login process 
     225   echo " eee : ${IRCAAM_LOG} not reachable" 
     226   # nb : no exit because this file should be launched by login process 
    227227fi 
    228228# 
     
    230230if [ ! -w ${IRCAAM_LOG} ] 
    231231then 
    232  echo " eee : ${IRCAAM_LOG} not writable" 
    233  # nb : no exit because this file shouldreachable be launched by login process 
     232   echo " eee : ${IRCAAM_LOG} not writable" 
     233   # nb : no exit because this file shouldreachable be launched by login process 
    234234fi 
    235235# 
     
    249249if [ ! -x ${IRCAAM_ID} ] 
    250250then 
    251  echo " eee : ${IRCAAM_ID} not reachable" 
    252  # nb : no exit because this file should be launched by login process 
     251   echo " eee : ${IRCAAM_ID} not reachable" 
     252   # nb : no exit because this file should be launched by login process 
    253253fi 
    254254# 
     
    258258if [ ! -d ${IRCAAM_OD} ] 
    259259then 
    260   mkdir -p ${IRCAAM_OD} 
    261   echo "${command} : iii : creation of \${IRCAAM_OD}" 
     260   mkdir -p ${IRCAAM_OD} 
     261   echo "${command} : iii : creation of \${IRCAAM_OD}" 
    262262fi 
    263263# check for permission on IRCAAM_OD 
  • trunk/src/plogd.sh

    r75 r77  
    6565system=$(uname) 
    6666case "${system}" in 
    67 AIX|IRIX64) 
    68   echo " www : no specific posix checking" 
    69 ;; 
    70 *) 
    71   set -o posix 
    72 ;; 
     67   AIX|IRIX64) 
     68      echo " www : no specific posix checking" 
     69   ;; 
     70   *) 
     71      set -o posix 
     72   ;; 
    7373esac 
    7474unset system 
     
    8080if [ "${1}" = "" ] 
    8181then 
    82  echo "${command} : eee : 1st parameter missing" >&2 
    83  exit 1 
     82   echo "${command} : eee : 1st parameter missing" >&2 
     83   exit 1 
    8484fi 
    8585# test if a2ps available 
     
    8989if [ ${status} -ne 0 ] 
    9090then 
    91  echo "${command} : eee : ${tool} unavailable" >&2 
    92  exit 4 
     91   echo "${command} : eee : ${tool} unavailable" >&2 
     92   exit 4 
    9393fi 
    9494unset tool 
     
    102102if [ ${tmp} -eq 0 ] 
    103103then 
    104  if [ "${log}" = "" ] 
    105  then 
    106   echo "${command} : eee : no release of ${IRCAAM_LOG}/${1}.log" >&2 
    107   exit 1 
    108  else 
    109   # printing 
    110   a2ps --print-anyway=1 ${log} 
    111   exit 0 
    112  fi 
     104   if [ "${log}" = "" ] 
     105   then 
     106      echo "${command} : eee : no release of ${IRCAAM_LOG}/${1}.log" >&2 
     107      exit 1 
     108   else 
     109      # printing 
     110      a2ps --print-anyway=1 ${log} 
     111      exit 0 
     112   fi 
    113113else 
    114  exit 1 
     114   exit 1 
    115115fi 
  • trunk/src/refdataget.sh

    r75 r77  
    8787system=$(uname) 
    8888case "${system}" in 
    89 AIX|IRIX64) 
    90  echo " www : no specific posix checking" 
    91 ;; 
    92 *) 
    93  set -o posix 
    94 ;; 
     89   AIX|IRIX64) 
     90      echo " www : no specific posix checking" 
     91   ;; 
     92   *) 
     93      set -o posix 
     94   ;; 
    9595esac 
    9696unset system 
     
    110110if [ "${IRCAAM_LOG}" = "" ] 
    111111then 
    112  echo " eee : \${IRCAAM_LOG} not defined" 
    113  exit 1 
     112   echo " eee : \${IRCAAM_LOG} not defined" 
     113   exit 1 
    114114fi 
    115115# 
     
    117117if [ ! -d ${IRCAAM_LOG} ] 
    118118then 
    119  echo " eee : ${IRCAAM_LOG} not found" 
    120  exit 1 
     119   echo " eee : ${IRCAAM_LOG} not found" 
     120   exit 1 
    121121fi 
    122122# 
     
    124124if [ ! -x ${IRCAAM_LOG} ] 
    125125then 
    126  echo " eee : ${IRCAAM_LOG} not reachable" 
    127  exit 1 
     126   echo " eee : ${IRCAAM_LOG} not reachable" 
     127   exit 1 
    128128fi 
    129129# 
     
    131131if [ ! -w ${IRCAAM_LOG} ] 
    132132then 
    133  echo " eee : ${IRCAAM_LOG} not writable" 
    134  exit 1 
     133   echo " eee : ${IRCAAM_LOG} not writable" 
     134   exit 1 
    135135fi 
    136136# 
     
    144144if [ ! -w ${IRCAAM_ID} ] 
    145145then 
    146  echo " eee : ${IRCAAM_ID} not writable" 
    147  exit 1 
     146   echo " eee : ${IRCAAM_ID} not writable" 
     147   exit 1 
    148148fi 
    149149 
     
    159159for simu in ${list_simu} 
    160160do 
    161  case ${simu} in 
    162  CtIV|CtCl|AfNQIVIV) 
    163   dirref="${dirrefb}/Sim/" 
    164  ;; 
    165  AsNQIVIV) 
    166   dirref="${dirrefb}/Sim_As/" 
    167  ;; 
    168  TrNQIVIV) 
    169   dirref="${dirrefb}/Sim_Tr/" 
    170  ;; 
    171  *) 
    172   echo "eee : wrong \${simu}" 
    173   exit 1 
    174  esac 
    175  dirref="${dirref}/${simu}/" 
    176  for param in ${list_param} 
    177  do 
    178   year_i=${year_min} 
    179   while [ ${year_i} -le ${year_max} ] 
    180   do 
    181    year_c=$(printf "%4.4d" ${year_i}') 
    182    fileref=${param}.${simu}.${year_c}06-09.nc 
    183    if  [ -f ${IRCAAM_ID}/${fileref} ] 
    184    then 
    185     echo "iii : ${IRCAAM_ID}/${fileref} exist" ${log} 2>&1 
    186     echo "iii : nothing done" >> ${log} 2>&1 
    187    else 
    188     wget --no-verbose --user=ircaam-dods --password=${dods_passwd} \ 
    189     -P ${IRCAAM_ID} \ 
    190     ${dirref}/${fileref} >> ${log} 2>&1 
    191     # ++ ok ? 
    192     # ++ si climserv faire ln -s ${dirref}/${fileref} ${VARAMMA_ID}/ 
    193    fi 
    194    year_i=$(( ${year_i} + 1 )) 
    195   done 
    196  done 
     161   case ${simu} in 
     162      CtIV|CtCl|AfNQIVIV) 
     163         dirref="${dirrefb}/Sim/" 
     164      ;; 
     165      AsNQIVIV) 
     166         dirref="${dirrefb}/Sim_As/" 
     167      ;; 
     168      TrNQIVIV) 
     169         dirref="${dirrefb}/Sim_Tr/" 
     170      ;; 
     171      *) 
     172         echo "eee : wrong \${simu}" 
     173         exit 1 
     174      ;; 
     175   esac 
     176   dirref="${dirref}/${simu}/" 
     177   for param in ${list_param} 
     178   do 
     179      year_i=${year_min} 
     180      while [ ${year_i} -le ${year_max} ] 
     181      do 
     182         year_c=$(printf "%4.4d" ${year_i}') 
     183         fileref=${param}.${simu}.${year_c}06-09.nc 
     184         if  [ -f ${IRCAAM_ID}/${fileref} ] 
     185         then 
     186            echo "iii : ${IRCAAM_ID}/${fileref} exist" ${log} 2>&1 
     187            echo "iii : nothing done" >> ${log} 2>&1 
     188         else 
     189            wget --no-verbose --user=ircaam-dods --password=${dods_passwd} \ 
     190               -P ${IRCAAM_ID} \ 
     191               ${dirref}/${fileref} >> ${log} 2>&1 
     192            # ++ ok ? 
     193            # ++ si climserv faire ln -s ${dirref}/${fileref} ${VARAMMA_ID}/ 
     194         fi 
     195         year_i=$(( ${year_i} + 1 )) 
     196      done 
     197   done 
    197198done 
    198  
    199199# OLR 
    200200fileref=olr.day.mean.nc 
     
    202202if  [ -f ${IRCAAM_ID}/${fileref} ] 
    203203then 
    204  echo "iii : ${IRCAAM_ID}/${fileref} exist"  >> ${log} 2>&1 
    205  echo "iii : nothing done" >> ${log} 2>&1 
     204   echo "iii : ${IRCAAM_ID}/${fileref} exist"  >> ${log} 2>&1 
     205   echo "iii : nothing done" >> ${log} 2>&1 
    206206else 
    207  wget --no-verbose -P ${IRCAAM_ID} ${dirref}/${fileref} >> ${log} 
    208  # ++ ok ? 
     207   wget --no-verbose -P ${IRCAAM_ID} ${dirref}/${fileref} >> ${log} 
     208   # ++ ok ? 
    209209fi 
    210210# 
  • trunk/src/tlogd.sh

    r75 r77  
    7070system=$(uname) 
    7171case "${system}" in 
    72 AIX|IRIX64) 
    73   echo " www : no specific posix checking" 
    74 ;; 
    75 *) 
    76   set -o posix 
    77 ;; 
     72   AIX|IRIX64) 
     73      echo " www : no specific posix checking" 
     74   ;; 
     75   *) 
     76      set -o posix 
     77   ;; 
    7878esac 
    7979unset system 
     
    8585if [ "${1}" = "" ] 
    8686then 
    87  echo "${command} : eee : 1st parameter missing" >&2 
    88  exit 1 
     87   echo "${command} : eee : 1st parameter missing" >&2 
     88   exit 1 
    8989fi 
    9090# check for ${IRCAAM_LOG} definition 
    9191if [ "${IRCAAM_LOG}" = "" ] 
    9292then 
    93  echo " eee : \${IRCAAM_LOG} not defined" 
    94  exit 1 
     93   echo " eee : \${IRCAAM_LOG} not defined" 
     94   exit 1 
    9595fi 
    9696# 
     
    9898if [ ! -d ${IRCAAM_LOG} ] 
    9999then 
    100  echo " eee : ${IRCAAM_LOG} not found" 
    101  exit 1 
     100   echo " eee : ${IRCAAM_LOG} not found" 
     101   exit 1 
    102102fi 
    103103# 
     
    105105if [ ! -x ${IRCAAM_LOG} ] 
    106106then 
    107  echo " eee : ${IRCAAM_LOG} not reachable" 
    108  exit 1 
     107   echo " eee : ${IRCAAM_LOG} not reachable" 
     108   exit 1 
    109109fi 
    110110# 
     
    114114if [ ${tmp} -eq 0 ] 
    115115then 
    116  if [ "${log}" = "" ] 
    117  then 
    118   echo "${command} : eee : no release of ${IRCAAM_LOG}/${1}.log" >&2 
    119   exit 1 
    120  else 
    121   more ${log} 
    122   exit 0 
    123  fi 
     116   if [ "${log}" = "" ] 
     117   then 
     118      echo "${command} : eee : no release of ${IRCAAM_LOG}/${1}.log" >&2 
     119      exit 1 
     120   else 
     121      more ${log} 
     122      exit 0 
     123   fi 
    124124else 
    125  exit 1 
     125   exit 1 
    126126fi 
Note: See TracChangeset for help on using the changeset viewer.