mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-19 17:57:22 +01:00
19 lines
366 B
Perl
Executable File
19 lines
366 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
$XMLFILE=@ARGV[0];
|
|
|
|
if (-x "/usr/bin/opendiff") { $TOOL="opendiff"; }
|
|
else { $TOOL="tkdiff -b -B "; }
|
|
|
|
|
|
|
|
while (<>) {
|
|
$str=$_;
|
|
while ( $str=~ /<Firewall / ) {
|
|
$str=~ /<Firewall [^>]+name="([^"]*).*$"/;
|
|
$fw=$1;
|
|
printf "$TOOL %s.fw.orig %s.fw\n",$fw,$fw;
|
|
$str=~ s/^.*<Firewall [^>]+name="$fw"[^>]+>//;
|
|
}
|
|
}
|