diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-02-11 21:06:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-02-11 21:06:21 +0000 |
commit | 6622f850d4887c4b7efb36ab22f2923bee80ddde (patch) | |
tree | a26a6a13aa19809663c819d207e7107326972290 /helpcontent2/helpers | |
parent | e3f4c59f1b96e4046d6ffbac342a25a78204fe59 (diff) |
ensure no busted xml .tree can happen again
Diffstat (limited to 'helpcontent2/helpers')
-rw-r--r-- | helpcontent2/helpers/update_tree.pl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/helpcontent2/helpers/update_tree.pl b/helpcontent2/helpers/update_tree.pl index 8dc7bf4e98..80befc2d4e 100644 --- a/helpcontent2/helpers/update_tree.pl +++ b/helpcontent2/helpers/update_tree.pl @@ -46,6 +46,7 @@ terminate() if ( ! defined $inpath ); my $destpath = $inpath; my $with_lang = $ENV{WITH_LANG}; +my $xmllint = $ENV{XMLLINT}; # Always use / directory separators @@ -308,6 +309,7 @@ sub processtreefiles { unlink "$tree_dest/$lng/$tv" ; my $ret=mv $treetmpfile , "$tree_dest/$lng/$tv$inpath" or &terminate("Cannot write to $tree_dest/$lng/$tv$inpath - Error $!"); my $ret=mv "$tree_dest/$lng/$tv$inpath" , "$tree_dest/$lng/$tv" or &terminate("Cannot write to $tree_dest/$lng/$tv - Error $!"); + system("$xmllint --noout --noent $tree_dest/$lng/$tv") == 0 or &terminate("$tree_dest/$lng/$tv is illformed xml (xmllint)" ); } } else { &terminate("Cannot write to $tvout"); |