Changeset 116 for palm/trunk/SCRIPTS


Ignore:
Timestamp:
Oct 11, 2007 2:30:27 AM (15 years ago)
Author:
raasch
Message:

further preliminary updates concerning particle sorting and documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mbuild

    r83 r116  
    9090     #                    from configuration file
    9191     #                    host identifier (local_host) is read from config file
     92     # 10/10/07 - Siggi - bugfix: handling of comment lines
    9293
    9394
     
    185186 while read line
    186187 do
    187     if [[ "$line" != ""  ||  $(echo $line | cut -c1) != "#" ]]
     188    if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    188189    then
    189190       HOSTNAME=`echo $line | cut -d" " -s -f2`
     
    228229 while read line
    229230 do
    230     if [[ "$line" != ""  ||  $(echo $line | cut -c1) != "#" ]]
     231    if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    231232    then
    232233       local_username=`echo $line | cut -d" " -s -f2`
     
    252253 while read line
    253254 do
    254     if [[ "$line" != ""  &&  "$(echo $line | cut -d" " -s -f3)" = "" ]]
     255    if [[ "$line" != ""  &&  "$(echo $line | cut -d" " -s -f3)" = ""  &&  $(echo $line | cut -c1) != "#" ]]
    255256    then
    256257       var=`echo $line | cut -d" " -s -f1 | cut -c2-`
     
    721722       # IP-ADRESSE DES REMOTE-RECHNERS BESTIMMEN
    722723    case  $remote_host  in
    723         (lcmuk)          remote_addres=130.75.105.3;;
     724        (lcmuk)          remote_addres=130.75.105.2;;
    724725        (lctit)          remote_addres=172.17.75.161;;
    725726        (decalpha)       remote_addres=165.132.26.56;;
     
    741742       # REMOTE-USERNAMEN ERMITTELN
    742743    line=""
     744    found=false
    743745    grep  "$remote_host_string" $config_file | grep "%remote_username"  >  tmp_mbuild
    744746    while read line1
    745747    do
     748
    746749       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
    747750       then
    748751          line="$line1"
    749752       fi
     753
     754       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     755       then
     756          remote_username=`echo $line | cut -d" " -s -f2`
     757          found=true
     758       fi
     759
    750760    done < tmp_mbuild
    751761
    752     if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
     762    if [[ $found = false ]]
    753763    then
    754764       printf "\n  +++ no remote username found in configuration file"
    755765       printf "\n      for \"$remote_host_string\" "
    756766       locat=config_file; exit
    757     else
    758        remote_username=`echo $line | cut -d" " -s -f2`
    759767    fi
    760768
     
    766774    while read line1
    767775    do
     776
    768777       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
    769778       then
    770779          line="$line1"
    771780       fi
     781
     782       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     783       then
     784          remote_source_path=`echo $line | cut -d" " -s -f2`
     785       fi
     786
    772787    done < tmp_mbuild
    773788
    774     if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    775     then
    776        remote_source_path=`echo $line | cut -d" " -s -f2`
    777     fi
    778789    if [[ "$remote_source_path" = "" ]]
    779790    then
     
    798809    while read line1
    799810    do
     811
    800812       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
    801813       then
    802814          line="$line1"
    803815       fi
     816
     817       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     818       then
     819          remote_md=`echo $line | cut -d" " -s -f2`
     820       fi
     821
    804822    done < tmp_mbuild
    805823
    806     if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    807     then
    808        remote_md=`echo $line | cut -d" " -s -f2`
    809     fi
    810824    if [[ "$remote_md" = "" ]]
    811825    then
     
    826840       # COMPILERNAMEN ERMITTELN
    827841    line=""
     842    found=false
    828843    grep  "$remote_host_string" $config_file | grep "%compiler_name "  >  tmp_mbuild
    829844    while read line1
    830845    do
     846
    831847       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
    832848       then
    833849          line="$line1"
    834850       fi
     851
     852       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     853       then
     854          compiler_name=`echo $line | cut -d" " -s -f2`
     855          found=true
     856       fi
     857
    835858    done < tmp_mbuild
    836859
    837     if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
     860    if [[ $found = false ]]
    838861    then
    839862       printf "\n  +++ no compiler name found in configuration file"
    840863       printf "\n      for \"$remote_host_string\" "
    841864       locat=config_file; exit
    842     else
    843        compiler_name=`echo $line | cut -d" " -s -f2`
    844865    fi
    845866
     
    850871    then
    851872       line=""
     873       found=false
    852874       grep  "$remote_host_string" $config_file | grep "%compiler_name_ser"  >  tmp_mbuild
    853875       while read line1
    854876       do
     877
    855878          if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
    856879          then
    857880             line="$line1"
    858881          fi
     882
     883          if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     884          then
     885             compiler_name_ser=`echo $line | cut -d" " -s -f2`
     886             found=true
     887          fi
     888
    859889       done < tmp_mbuild
    860890
    861        if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
     891       if [[ $found = false ]]
    862892       then
    863893          printf "\n  +++ no serial compiler name found in configuration file"
    864894          printf "\n      for \"$remote_host_string\" "
    865895          locat=config_file; exit
    866        else
    867           compiler_name_ser=`echo $line | cut -d" " -s -f2`
    868896       fi
    869897    else
     
    875903       # PRAEPROZESSOR-OPTIONEN/DIREKTIVEN ERMITTELN
    876904    line=""
     905    found=false
    877906    grep  "$remote_host_string" $config_file | grep "%cpp_options"  >  tmp_mbuild
    878907    while read line1
    879908    do
     909
    880910       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
    881911       then
    882912          line="$line1"
    883913       fi
     914
     915       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     916       then
     917             # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
     918          cpp_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
     919          found=true
     920       fi
     921
    884922    done < tmp_mbuild
    885     if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
     923
     924    if [[ $found = false ]]
    886925    then
    887926       printf "\n  +++ no preprocessor options found in configuration file"
    888927       printf "\n      for \"$remote_host_string\" "
    889928       locat=config_file; exit
    890     else
    891           # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
    892        cpp_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    893     fi
     929    fi
     930
    894931
    895932       # RECHNERSPEZIFISCHE CPP-DIREKTIVEN HINZUFUEGEN
     
    922959    while read line1
    923960    do
     961
    924962       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
    925963       then
    926964          line="$line1"
    927965       fi
     966
     967       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     968       then
     969             # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
     970          netcdf_inc=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
     971       fi
     972
    928973    done < tmp_mbuild
    929     if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    930     then
    931           # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
    932        netcdf_inc=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    933     fi
    934974
    935975    line=""
     
    937977    while read line1
    938978    do
     979
    939980       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
    940981       then
    941982          line="$line1"
    942983       fi
     984
     985       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     986       then
     987             # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
     988          netcdf_lib=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
     989       fi
     990
    943991    done < tmp_mbuild
    944     if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    945     then
    946           # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
    947        netcdf_lib=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    948     fi
    949992
    950993
     
    952995       # COMPILEROPTIONEN ERMITTELN
    953996    line=""
     997    found=false
    954998    grep  "$remote_host_string" $config_file | grep "%fopts"  >  tmp_mbuild
    955999    while read line1
    9561000    do
     1001
    9571002       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
    9581003       then
    9591004          line="$line1"
    9601005       fi
     1006
     1007       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     1008       then
     1009             # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
     1010          compiler_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
     1011          found=true
     1012
     1013             # NETCDF-INCLUDEVERZEICHNIS HINZUFUEGEN
     1014          compiler_options="$compiler_options $netcdf_inc"
     1015       fi
     1016
    9611017    done < tmp_mbuild
    962     if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
     1018
     1019    if [[ $found = false ]]
    9631020    then
    9641021       printf "\n  +++ no compiler options found in configuration file"
    9651022       printf "\n      for \"$remote_host_string\" "
    9661023       locat=config_file; exit
    967     else
    968           # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
    969        compiler_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    970 
    971           # NETCDF-INCLUDEVERZEICHNIS HINZUFUEGEN
    972        compiler_options="$compiler_options $netcdf_inc"
    9731024    fi
    9741025
     
    9771028       # LADER-OPTIONEN ERMITTELN
    9781029    line=""
     1030    found=false
    9791031    grep  "$remote_host_string" $config_file | grep "%lopts"  >  tmp_mbuild
    9801032    while read line1
    9811033    do
     1034
    9821035       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
    9831036       then
    9841037          line="$line1"
    9851038       fi
     1039
     1040       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     1041       then
     1042             # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
     1043          loader_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
     1044          found=true
     1045
     1046             # NETCDF-LIBRARY HINZUFUEGEN
     1047          loader_options="$loader_options $netcdf_lib"
     1048       fi
     1049
    9861050    done < tmp_mbuild
    9871051
    988     if [[ "$line" = ""  ||  $(echo $line | cut -c1) = "#" ]]
     1052    if [[ $found = false ]]
    9891053    then
    9901054       printf "\n  +++ no loader options found in configuration file"
    9911055       printf "\n      for \"$remote_host_string\" "
    9921056       locat=config_file; exit
    993     else
    994           # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
    995        loader_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    996 
    997           # NETCDF-LIBRARY HINZUFUEGEN
    998        loader_options="$loader_options $netcdf_lib"
    9991057    fi
    10001058
Note: See TracChangeset for help on using the changeset viewer.