Changeset 936 for palm/trunk/SCRIPTS


Ignore:
Timestamp:
Jun 25, 2012 1:15:54 PM (12 years ago)
Author:
raasch
Message:

new option -K for mbuild

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mbuild

    r935 r936  
    135135     # 05/06/12 - Bjoern- bugfixes for execution of login_init_cmd
    136136     # 18/06/12 - Siggi - option -v (silent mode) added
     137     # 25/06/12 - Siggi - option -K (block conditions) added
    137138
    138139
    139140    # VARIABLE DECLARATIONS + DEFAULT VALUES
     141 block_conditions=none
     142 block_conditions_found=false
    140143 compile_utility_programs=false
    141144 config_file=.mrun.config
     
    182185
    183186    # READ SHELLSCRIPT-OPTIONS
    184  while  getopts  :c:h:m:s:uv  option
     187 while  getopts  :c:h:K:m:s:uv  option
    185188 do
    186189   case  $option  in
    187190       (c)   config_file=$OPTARG;;
    188191       (h)   host=$OPTARG;;
     192       (K)   block_conditions=$OPTARG;;
    189193       (m)   makefile=$OPTARG;;
    190194       (s)   suf=$OPTARG;;
     
    256260 fi
    257261
     262
     263    # determine the block conditions
     264 if [[ $block_conditions != none ]]
     265 then
     266    block_condition1=`echo $block_conditions | cut -d" " -f1`
     267    block_condition2=`echo $block_conditions | cut -d" " -f2`
     268    if [[ "$block_condition2" = "$block_condition1" ]]
     269    then
     270       block_condition2=""
     271    fi
     272    echo "*** block conditions =  1:\"$block_condition1\"  2:\"$block_condition2\""
     273 fi
    258274
    259275 
     
    484500    (( ih = ih + 1 ))
    485501
    486        # REMOTE-RECHNER UND UEBERSETZUNGS-VERSION FESTSTELLEN
    487        # NUR WEITERMACHEN, WENN ENTSPRECHENDER REMOTE-RECHNER MITTELS
    488        # SHELLSCRIPT-OPTION AUCH AUSGEWAEHLT WURDE
     502       # determine remote host and conditions for the respective block
     503       # continue, only if this host has been chosen via -h option and if
     504       # conditions have been chosen via -K option
    489505    remote_host_string=`echo ${hostline[$ih]} | cut -d" " -s -f3-`
    490506    remote_host=`echo $remote_host_string | cut -d" " -f1`
     
    500516    else
    501517       condition2=`echo $remote_host_string | cut -d" " -s -f3`
     518    fi
     519
     520    if [[ $block_conditions != none ]]
     521    then
     522       if [[ "$condition1" != "$block_condition1"  || "$condition2" != "$block_condition2" ]]
     523       then
     524          continue
     525       fi
     526       block_conditions_found=true
    502527    fi
    503528
     
    15001525 fi
    15011526
     1527 if [[ "$block_conditions" != none  &&  $block_conditions_found = false ]]
     1528 then
     1529    printf "\n  +++ block conditions \"$block_conditions\" not found for host \"$host\""
     1530 fi
    15021531
    15031532
Note: See TracChangeset for help on using the changeset viewer.