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

indent shell scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Documentation/xmldoc/docompileall.sh

    r420 r430  
    102102system=$(uname) 
    103103case "${system}" in 
    104  AIX|IRIX64) 
    105  echo " www : no specific posix checking" 
    106  ;; 
    107  *) 
    108  set -o posix 
    109  ;; 
     104   AIX|IRIX64) 
     105      echo " www : no specific posix checking" 
     106   ;; 
     107   *) 
     108      set -o posix 
     109   ;; 
    110110esac 
    111111command=$(basename ${0}) 
     
    119119if [ ${#} -lt ${minargcount} ] 
    120120then 
    121  echo "eee : not enought arguments (${#} vs ${minargcount})" 
    122  echo "${usage}" 
    123  exit 1 
     121  echo "eee : not enought arguments (${#} vs ${minargcount})" 
     122  echo "${usage}" 
     123  exit 1 
    124124fi 
    125125# 
     
    134134while [ ! -z "${1}" ] 
    135135do 
    136  case ${1} in 
    137  -i) 
    138  indir=${2} 
    139  shift 
    140  ;; 
    141  -idl_dir) 
    142  idl_dir=${2} 
    143  shift 
    144  ;; 
    145  -h) 
    146  echo "${usage}" 
    147  exit 0 
    148  ;; 
    149  *) # other choice 
    150  echo "${usage}" 
    151  exit 1 
    152  ;; 
    153  esac 
    154  shift # next flag 
     136   case ${1} in 
     137      -i) 
     138         indir=${2} 
     139         shift 
     140      ;; 
     141      -idl_dir) 
     142         idl_dir=${2} 
     143         shift 
     144      ;; 
     145      -h) 
     146         echo "${usage}" 
     147         exit 0 
     148      ;; 
     149      *) # other choice 
     150        echo "${usage}" 
     151        exit 1 
     152      ;; 
     153   esac 
     154   shift # next flag 
    155155done 
    156156# 
     
    160160if [ ! -d ${indir} ] 
    161161then 
    162  echo "eee : ${indir} not found" 
    163  exit 1 
     162   echo "eee : ${indir} not found" 
     163   exit 1 
    164164fi 
    165165# 
     
    178178if [ "${indir}" != "${SAXO_DIR}/SRC/" ] 
    179179then 
    180  cat <<EOF >> /tmp/docompileall${$}.pro 
     180   cat <<EOF >> /tmp/docompileall${$}.pro 
    181181!path = expand_path('+' + '${indir}') + ':' + !path 
    182182EOF 
     
    208208if [ "${list_files}" = "" ] 
    209209then 
    210  echo "eee : no . pro files found under ${indir}" 
    211  exit 1 
     210   echo "eee : no . pro files found under ${indir}" 
     211   exit 1 
    212212fi 
    213213#  
     
    216216for i in ${list_files} 
    217217do 
    218  # does it contains pro or function ? 
    219  egrep -iq '^ * *(pro|function)' ${i} 
    220  if [ ${?} -eq 0 ] 
    221  then 
    222   echo "print, '$( basename ${i} .pro ) :'" >> /tmp/docompileall${$}.pro 
    223   echo "resolve_all, resolve_either = '$( basename ${i} .pro )', skip_routines = ['xxx2ps','trends', 'label_gmt', 'report']" >> /tmp/docompileall${$}.pro 
    224  fi 
     218   # does it contains pro or function ? 
     219   egrep -iq '^ *       *(pro|function)' ${i} 
     220   if [ ${?} -eq 0 ] 
     221   then 
     222      echo "print, '$( basename ${i} .pro ) :'" >> /tmp/docompileall${$}.pro 
     223      echo "resolve_all, resolve_either = '$( basename ${i} .pro )', skip_routines = ['xxx2ps','trends', 'label_gmt', 'report']" >> /tmp/docompileall${$}.pro 
     224   fi 
    225225done 
    226226echo "exit" >> /tmp/docompileall${$}.pro 
     
    233233if [ ${?} -ne 0 ] 
    234234then 
    235  echo "all files are OK" 
    236  # clean 
    237  rm -f /tmp/docompileallerr_${$} /tmp/docompileall${$}.pro 
     235   echo "all files are OK" 
     236   # clean 
     237   rm -f /tmp/docompileallerr_${$} /tmp/docompileall${$}.pro 
    238238else 
    239  grep "Compilation error(s)" /tmp/docompileallerr_${$} 
    240  echo "eee : see /tmp/docompileallerr_${$}" 
    241  more /tmp/docompileallerr_${$} 
    242  exit 1 
    243 fi 
    244  
     239   grep "Compilation error(s)" /tmp/docompileallerr_${$} 
     240   echo "eee : see /tmp/docompileallerr_${$}" 
     241   more /tmp/docompileallerr_${$} 
     242   exit 1 
     243fi 
    245244# end 
    246245exit 0 
Note: See TracChangeset for help on using the changeset viewer.