Changeset 8089

Show
Ignore:
Timestamp:
08/22/09 20:32:01 (2 years ago)
Author:
p_lindheimer
Message:

fixes #3532 changes to publish.pl to handle empty tags

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.6/publish.pl

    r7972 r8089  
    292292  close MD5; 
    293293  ($md5sum, $null) = split(/ /, $md5); 
    294   $newxml =~ s/<md5sum>.+<\/md5sum>/<md5sum>$md5sum<\/md5sum>/; 
    295   $newxml =~ s/<location>.+<\/location>/<location>$reldir$rver\/$filename<\/location>/; 
     294 
     295       unless ($newxml =~ s/<md5sum>.*<\/md5sum>/<md5sum>$md5sum<\/md5sum>/) 
     296       { 
     297               $newxml =~ s|</module>|<md5sum>$md5sum></md5sum>\n</module>|; 
     298       } 
     299 
     300       unless ($newxml =~ s/<location>.*<\/location>/<location>$reldir$rver\/$filename<\/location>/) 
     301       { 
     302               $newxml =~ s|</module>|<location>$reldir$rver></location>\n</module>|; 
     303       } 
     304 
    296305  open FH, ">$moddir/module.xml"; 
    297306  print FH $newxml;