Changeset 299


Ignore:
Timestamp:
01/14/11 00:59:12 (13 years ago)
Author:
nanardon
Message:
  • rename client to tools
Files:
1 edited
5 copied
1 moved

Legend:

Unmodified
Added
Removed
  • server/trunk/admin/bin/sophie_load

    r256 r299  
    88 
    99GetOptions( 
    10         'f=s' => \my $file, 
    11         's=s' => \my $server, 
     10    's=s' => \my $server, 
    1211); 
    1312 
     
    2928} 
    3029 
    31 my $string; 
    32 if ($file) { 
    33     open($handle, '<', $file) || die "can't open file $!"; 
    34     $string = join('', <$handle>); 
    35     close($handle); 
     30if (@ARGV) { 
     31    my @string; 
     32    foreach my $file (@ARGV) { 
     33        warn "Reading $file\n"; 
     34        open($handle, '<', $file) || die "can't open file $!"; 
     35        push(@string, join('', <$handle>)); 
     36        close($handle); 
     37    } 
     38 
     39    foreach my $string (@string) { 
     40        my $res = $xmlcli->send_request('admin.load_distrib', $string); 
     41        print $res->value . "\n"; 
     42    } 
    3643} else { 
    37     $string = join('', <STDIN>); 
     44    my $string = join('', <STDIN>); 
     45    my $res = $xmlcli->send_request('admin.load_distrib', $string); 
     46    print $res->value . "\n"; 
    3847} 
    39  
    40 my $res = $xmlcli->send_request('admin.load_distrib', $string); 
    41 print $res->value . "\n"; 
Note: See TracChangeset for help on using the changeset viewer.