Changeset 69 for palm/trunk/SCRIPTS/mbuild
- Timestamp:
- Mar 18, 2007 11:44:44 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mbuild
r67 r69 84 84 # 14/03/07 - Siggi - fimm admitted, revision number added to terminal 85 85 # output 86 # 16/03/07 - Siggi - adjustments (netcdf) for lctit 87 # adjustments for running under pdksh, local ip-addres 88 # is not determined any more 86 89 87 90 … … 113 116 # FEHLERBEHANDLUNG 114 117 # BEI EXIT: 115 trap 'if [[ $locat != normal ]] 118 trap 'rm -rf tmp_mbuild 119 if [[ $locat != normal ]] 116 120 then 117 121 printf "\n\n +++ mbuild killed \n\n" … … 122 126 123 127 # BEI TERMINAL-BREAK: 124 trap 'printf "\n\n +++ mbuild killed by \"^C\" \n\n" 128 trap 'rm -rf tmp_mbuild 129 printf "\n\n +++ mbuild killed by \"^C\" \n\n" 125 130 exit 126 131 ' 2 … … 156 161 # LOKALEN RECHNER ERMITTELN 157 162 local_host_real_name=$(hostname) 158 local_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}') 163 # local_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}') 164 159 165 case $local_host_real_name in 160 166 (atmos) local_host=lcide;; … … 163 169 (fimm.bccs.uib.no) local_host=lcmuk;; 164 170 (gate) local_host=neck;; 165 (gfdl3.yonsei.ac.kr) local_host=decalpha; local_addres=165.132.26.56;;166 (gfdl5) local_host=ibmy; local_addres=165.132.26.58;;171 (gfdl3.yonsei.ac.kr) local_host=decalpha;; 172 (gfdl5) local_host=ibmy;; 167 173 (gwdk081.gwdg.de) local_host=ibm;; 168 174 (hreg01a-en0|hreg02a-en0) local_host=ibmh;; … … 200 206 # BENUTZERNAMEN AUF LOKALEM RECHNER AUS KONFIGURATIONSDATEI ERMITTELN 201 207 line="" 202 grep " $local_host" $config_file | grep "%remote_username" | while read line 208 grep " $local_host" $config_file | grep "%remote_username" > tmp_mbuild 209 while read line 203 210 do 204 211 if [[ "$line" != "" || $(echo $line | cut -c1) != "#" ]] … … 206 213 local_username=`echo $line | cut -d" " -s -f2` 207 214 fi 208 done 215 done < tmp_mbuild 209 216 210 217 if [[ "$local_username" = "" ]] … … 222 229 # VARIABLEN SETZEN, WEIL DIESE EVTL. IN PFADNAMEN VERWENDET WERDEN 223 230 line="" 224 grep "%" $config_file | while read line 231 grep "%" $config_file > tmp_mbuild 232 while read line 225 233 do 226 234 if [[ "$line" != "" && "$(echo $line | cut -d" " -s -f3)" = "" ]] … … 231 239 # eval echo \" $var=\$$var \" # AUSGABE ZU TESTZWECKEN 232 240 fi 233 done 241 done < tmp_mbuild 234 242 235 243 # NUN PRUEFEN, OB EIN GLOBALER QUELLTEXTPFAD VEREINBART WURDE 236 244 line="" 237 grep "%source_path" $config_file | while read line 245 grep "%source_path" $config_file > tmp_mbuild 246 while read line 238 247 do 239 248 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] … … 244 253 fi 245 254 fi 246 done 255 done < tmp_mbuild 247 256 248 257 line="" 249 grep " $local_host" $config_file | grep "%source_path" | while read line 258 grep " $local_host" $config_file | grep "%source_path" > tmp_mbuild 259 while read line 250 260 do 251 261 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] … … 253 263 local_source_path=`echo $line | cut -d" " -s -f2` 254 264 fi 255 done 265 done < tmp_mbuild 256 266 257 267 if [[ "$local_source_path" = "" ]] … … 273 283 # EBENSO PFAD FUER DAS MAKE-DEPOSITORY ERMITTELN 274 284 line="" 275 grep "%depository_path" $config_file | while read line 285 grep "%depository_path" $config_file > tmp_mbuild 286 while read line 276 287 do 277 288 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] … … 282 293 fi 283 294 fi 284 done 295 done < tmp_mbuild 285 296 286 297 line="" 287 grep " $local_host" $config_file | grep "%depository_path" | while read line 298 grep " $local_host" $config_file | grep "%depository_path" > tmp_mbuild 299 while read line 288 300 do 289 301 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] … … 291 303 local_depository_path=`echo $line | cut -d" " -s -f2` 292 304 fi 293 done 305 done < tmp_mbuild 294 306 295 307 if [[ "$local_depository_path" = "" ]] … … 628 640 printf "\n *** scanning configuration file for host(s) ..." 629 641 630 grep %fopts $config_file | while read line 642 grep %fopts $config_file > tmp_mbuild 643 while read line 631 644 do 632 645 # KOMMENTARZEILEN UEBERSPRINGEN … … 634 647 (( ihost = ihost + 1 )) 635 648 hostline[$ihost]="$line" 636 done 649 done < tmp_mbuild 637 650 638 651 … … 699 712 fi;; 700 713 (lctit) remote_addres=172.17.75.161; netcdf_support=true 701 netcdf_path=/home/usr5/mkanda/netcdf-3.6. 1/src; cpp_options="-Mpreprocess";;714 netcdf_path=/home/usr5/mkanda/netcdf-3.6.2; cpp_options="-Mpreprocess";; 702 715 (decalpha) remote_addres=165.132.26.56; cpp_options="-cpp"; netcdf_support=true 703 716 netcdf_path=/usr/local/netcdf-3.5.1;; … … 728 741 # REMOTE-USERNAMEN ERMITTELN 729 742 line="" 730 grep "$remote_host_string" $config_file | grep "%remote_username" | while read line1 743 grep "$remote_host_string" $config_file | grep "%remote_username" > tmp_mbuild 744 while read line1 731 745 do 732 746 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] … … 734 748 line="$line1" 735 749 fi 736 done 750 done < tmp_mbuild 737 751 738 752 if [[ "$line" = "" || $(echo $line | cut -c1) = "#" ]] … … 749 763 line="" 750 764 remote_source_path="" 751 grep "$remote_host_string" $config_file | grep "%source_path" | while read line1 765 grep "$remote_host_string" $config_file | grep "%source_path" > tmp_mbuild 766 while read line1 752 767 do 753 768 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] … … 755 770 line="$line1" 756 771 fi 757 done 772 done < tmp_mbuild 758 773 759 774 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] … … 780 795 remote_md="" 781 796 line="" 782 grep "$remote_host_string" $config_file | grep "%depository_path" | while read line1 797 grep "$remote_host_string" $config_file | grep "%depository_path" > tmp_mbuild 798 while read line1 783 799 do 784 800 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] … … 786 802 line="$line1" 787 803 fi 788 done 804 done < tmp_mbuild 789 805 790 806 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] … … 810 826 # COMPILERNAMEN ERMITTELN 811 827 line="" 812 grep "$remote_host_string" $config_file | grep "%compiler_name " | while read line1 828 grep "$remote_host_string" $config_file | grep "%compiler_name " > tmp_mbuild 829 while read line1 813 830 do 814 831 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] … … 816 833 line="$line1" 817 834 fi 818 done 835 done < tmp_mbuild 819 836 820 837 if [[ "$line" = "" || $(echo $line | cut -c1) = "#" ]] … … 833 850 then 834 851 line="" 835 grep "$remote_host_string" $config_file | grep "%compiler_name_ser" | while read line1 852 grep "$remote_host_string" $config_file | grep "%compiler_name_ser" > tmp_mbuild 853 while read line1 836 854 do 837 855 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] … … 839 857 line="$line1" 840 858 fi 841 done 859 done < tmp_mbuild 842 860 843 861 if [[ "$line" = "" || $(echo $line | cut -c1) = "#" ]] … … 923 941 # COMPILEROPTIONEN ERMITTELN 924 942 line="" 925 grep "$remote_host_string" $config_file | grep "%fopts" | while read line1 943 grep "$remote_host_string" $config_file | grep "%fopts" > tmp_mbuild 944 while read line1 926 945 do 927 946 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] … … 929 948 line="$line1" 930 949 fi 931 done 950 done < tmp_mbuild 932 951 if [[ "$line" = "" || $(echo $line | cut -c1) = "#" ]] 933 952 then … … 947 966 (ibmy) compiler_options="-I ${netcdf_path}/include $compiler_options";; 948 967 (lcmuk) compiler_options="-I ${netcdf_path}/include $compiler_options";; 949 (lctit) compiler_options="-I ${netcdf_path}/ f90$compiler_options";;968 (lctit) compiler_options="-I ${netcdf_path}/include $compiler_options";; 950 969 (nech|neck) compiler_options="-I ${netcdf_path}/include $compiler_options";; 951 970 esac … … 956 975 # LADER-OPTIONEN ERMITTELN 957 976 line="" 958 grep "$remote_host_string" $config_file | grep "%lopts" | while read line1 977 grep "$remote_host_string" $config_file | grep "%lopts" > tmp_mbuild 978 while read line1 959 979 do 960 980 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] … … 962 982 line="$line1" 963 983 fi 964 done 984 done < tmp_mbuild 965 985 966 986 if [[ "$line" = "" || $(echo $line | cut -c1) = "#" ]] … … 980 1000 (ibms) loader_options="$loader_options -L${netcdf_path} -lnetcdf";; 981 1001 (ibmy) loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";; 982 (lctit) loader_options="$loader_options -L${netcdf_path}/lib src-lnetcdf";;1002 (lctit) loader_options="$loader_options -L${netcdf_path}/lib -lnetcdf";; 983 1003 esac 984 1004 fi
Note: See TracChangeset
for help on using the changeset viewer.