~kirkland/eucalyptus/label-metadata

« back to all changes in this revision

Viewing changes to tools/add_wsdllocation.pl

  • Committer: graziano obertelli
  • Date: 2009-01-07 03:32:35 UTC
  • Revision ID: graziano@cs.ucsb.edu-20090107033235-oxhuexp18v8hg0pw
Tags: 1.4
from CVS

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
#$fname = shift @ARGV || die "USAGE: add_wsdllocation.pl <service.xml> <wsdl_path>\n";
 
4
$wsdlpath = shift @ARGV || die "USAGE: cat <service.xml> | add_wsdllocation.pl <wsdl_path>\n";
 
5
 
 
6
$found=0;
 
7
while(<STDIN>) {
 
8
    my $orig = $_;
 
9
    my $line = $orig;
 
10
    chomp $line;
 
11
    $added = "";
 
12
    if ($found == 0) {
 
13
        if ($line =~ /^<service name=/) {
 
14
            $added = "<parameter name=\"wsdl_path\" locked=\"xsd:false\">$wsdlpath</parameter>\n";
 
15
        }
 
16
    }
 
17
    
 
18
    print ("$orig");
 
19
    print ("$added");
 
20
 
 
21
}
 
22
exit 0;