Changeset 116 for palm/trunk/SCRIPTS/mbuild
- Timestamp:
- Oct 11, 2007 2:30:27 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mbuild
r83 r116 90 90 # from configuration file 91 91 # host identifier (local_host) is read from config file 92 # 10/10/07 - Siggi - bugfix: handling of comment lines 92 93 93 94 … … 185 186 while read line 186 187 do 187 if [[ "$line" != "" ||$(echo $line | cut -c1) != "#" ]]188 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 188 189 then 189 190 HOSTNAME=`echo $line | cut -d" " -s -f2` … … 228 229 while read line 229 230 do 230 if [[ "$line" != "" ||$(echo $line | cut -c1) != "#" ]]231 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 231 232 then 232 233 local_username=`echo $line | cut -d" " -s -f2` … … 252 253 while read line 253 254 do 254 if [[ "$line" != "" && "$(echo $line | cut -d" " -s -f3)" = "" ]]255 if [[ "$line" != "" && "$(echo $line | cut -d" " -s -f3)" = "" && $(echo $line | cut -c1) != "#" ]] 255 256 then 256 257 var=`echo $line | cut -d" " -s -f1 | cut -c2-` … … 721 722 # IP-ADRESSE DES REMOTE-RECHNERS BESTIMMEN 722 723 case $remote_host in 723 (lcmuk) remote_addres=130.75.105. 3;;724 (lcmuk) remote_addres=130.75.105.2;; 724 725 (lctit) remote_addres=172.17.75.161;; 725 726 (decalpha) remote_addres=165.132.26.56;; … … 741 742 # REMOTE-USERNAMEN ERMITTELN 742 743 line="" 744 found=false 743 745 grep "$remote_host_string" $config_file | grep "%remote_username" > tmp_mbuild 744 746 while read line1 745 747 do 748 746 749 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 747 750 then 748 751 line="$line1" 749 752 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 750 760 done < tmp_mbuild 751 761 752 if [[ "$line" = "" || $(echo $line | cut -c1) = "#"]]762 if [[ $found = false ]] 753 763 then 754 764 printf "\n +++ no remote username found in configuration file" 755 765 printf "\n for \"$remote_host_string\" " 756 766 locat=config_file; exit 757 else758 remote_username=`echo $line | cut -d" " -s -f2`759 767 fi 760 768 … … 766 774 while read line1 767 775 do 776 768 777 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 769 778 then 770 779 line="$line1" 771 780 fi 781 782 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 783 then 784 remote_source_path=`echo $line | cut -d" " -s -f2` 785 fi 786 772 787 done < tmp_mbuild 773 788 774 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]]775 then776 remote_source_path=`echo $line | cut -d" " -s -f2`777 fi778 789 if [[ "$remote_source_path" = "" ]] 779 790 then … … 798 809 while read line1 799 810 do 811 800 812 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 801 813 then 802 814 line="$line1" 803 815 fi 816 817 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 818 then 819 remote_md=`echo $line | cut -d" " -s -f2` 820 fi 821 804 822 done < tmp_mbuild 805 823 806 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]]807 then808 remote_md=`echo $line | cut -d" " -s -f2`809 fi810 824 if [[ "$remote_md" = "" ]] 811 825 then … … 826 840 # COMPILERNAMEN ERMITTELN 827 841 line="" 842 found=false 828 843 grep "$remote_host_string" $config_file | grep "%compiler_name " > tmp_mbuild 829 844 while read line1 830 845 do 846 831 847 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 832 848 then 833 849 line="$line1" 834 850 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 835 858 done < tmp_mbuild 836 859 837 if [[ "$line" = "" || $(echo $line | cut -c1) = "#"]]860 if [[ $found = false ]] 838 861 then 839 862 printf "\n +++ no compiler name found in configuration file" 840 863 printf "\n for \"$remote_host_string\" " 841 864 locat=config_file; exit 842 else843 compiler_name=`echo $line | cut -d" " -s -f2`844 865 fi 845 866 … … 850 871 then 851 872 line="" 873 found=false 852 874 grep "$remote_host_string" $config_file | grep "%compiler_name_ser" > tmp_mbuild 853 875 while read line1 854 876 do 877 855 878 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 856 879 then 857 880 line="$line1" 858 881 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 859 889 done < tmp_mbuild 860 890 861 if [[ "$line" = "" || $(echo $line | cut -c1) = "#"]]891 if [[ $found = false ]] 862 892 then 863 893 printf "\n +++ no serial compiler name found in configuration file" 864 894 printf "\n for \"$remote_host_string\" " 865 895 locat=config_file; exit 866 else867 compiler_name_ser=`echo $line | cut -d" " -s -f2`868 896 fi 869 897 else … … 875 903 # PRAEPROZESSOR-OPTIONEN/DIREKTIVEN ERMITTELN 876 904 line="" 905 found=false 877 906 grep "$remote_host_string" $config_file | grep "%cpp_options" > tmp_mbuild 878 907 while read line1 879 908 do 909 880 910 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 881 911 then 882 912 line="$line1" 883 913 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 884 922 done < tmp_mbuild 885 if [[ "$line" = "" || $(echo $line | cut -c1) = "#" ]] 923 924 if [[ $found = false ]] 886 925 then 887 926 printf "\n +++ no preprocessor options found in configuration file" 888 927 printf "\n for \"$remote_host_string\" " 889 928 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 894 931 895 932 # RECHNERSPEZIFISCHE CPP-DIREKTIVEN HINZUFUEGEN … … 922 959 while read line1 923 960 do 961 924 962 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 925 963 then 926 964 line="$line1" 927 965 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 928 973 done < tmp_mbuild 929 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]]930 then931 # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN932 netcdf_inc=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`933 fi934 974 935 975 line="" … … 937 977 while read line1 938 978 do 979 939 980 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 940 981 then 941 982 line="$line1" 942 983 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 943 991 done < tmp_mbuild 944 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]]945 then946 # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN947 netcdf_lib=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`948 fi949 992 950 993 … … 952 995 # COMPILEROPTIONEN ERMITTELN 953 996 line="" 997 found=false 954 998 grep "$remote_host_string" $config_file | grep "%fopts" > tmp_mbuild 955 999 while read line1 956 1000 do 1001 957 1002 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 958 1003 then 959 1004 line="$line1" 960 1005 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 961 1017 done < tmp_mbuild 962 if [[ "$line" = "" || $(echo $line | cut -c1) = "#" ]] 1018 1019 if [[ $found = false ]] 963 1020 then 964 1021 printf "\n +++ no compiler options found in configuration file" 965 1022 printf "\n for \"$remote_host_string\" " 966 1023 locat=config_file; exit 967 else968 # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN969 compiler_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`970 971 # NETCDF-INCLUDEVERZEICHNIS HINZUFUEGEN972 compiler_options="$compiler_options $netcdf_inc"973 1024 fi 974 1025 … … 977 1028 # LADER-OPTIONEN ERMITTELN 978 1029 line="" 1030 found=false 979 1031 grep "$remote_host_string" $config_file | grep "%lopts" > tmp_mbuild 980 1032 while read line1 981 1033 do 1034 982 1035 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 983 1036 then 984 1037 line="$line1" 985 1038 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 986 1050 done < tmp_mbuild 987 1051 988 if [[ "$line" = "" || $(echo $line | cut -c1) = "#"]]1052 if [[ $found = false ]] 989 1053 then 990 1054 printf "\n +++ no loader options found in configuration file" 991 1055 printf "\n for \"$remote_host_string\" " 992 1056 locat=config_file; exit 993 else994 # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN995 loader_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`996 997 # NETCDF-LIBRARY HINZUFUEGEN998 loader_options="$loader_options $netcdf_lib"999 1057 fi 1000 1058
Note: See TracChangeset
for help on using the changeset viewer.