summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2005-12-15 05:42:45 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2005-12-15 05:42:45 +0000
commit10cf9f9f39c2ec0d5d79eccbd0ddea510ef9a121 (patch)
tree2b9b5dbbb674ee0185df85ba2332375c1f348773 /bin
parent8b03f4feca1add26e17e4c056ae68fbc01b29e22 (diff)
downloadfedora-doc-utils-10cf9f9f39c2ec0d5d79eccbd0ddea510ef9a121.tar.gz
fedora-doc-utils-10cf9f9f39c2ec0d5d79eccbd0ddea510ef9a121.tar.xz
fedora-doc-utils-10cf9f9f39c2ec0d5d79eccbd0ddea510ef9a121.zip
Cleaned up tacky if-series into an elegant if-elsif checklist ;-)
Diffstat (limited to 'bin')
-rw-r--r--bin/xmldiff.pl21
1 files changed, 8 insertions, 13 deletions
diff --git a/bin/xmldiff.pl b/bin/xmldiff.pl
index 0e59561..6b358e5 100644
--- a/bin/xmldiff.pl
+++ b/bin/xmldiff.pl
@@ -1,12 +1,12 @@
#!/usr/bin/perl
#
# Copyright (c) 2002, DecisionSoft Limited All rights reserved.
-# Please see:
-# http://software.decisionsoft.com/licence.html
+# Please see:
+# http://software.decisionsoft.com/licence.html
# for more information.
#
# Modified for the Fedora Docs Project by Tommy.Reynolds@MegaCoder.com
-#
+#
#
# xmldiff: xmldiff program - uses xmlpp, which must be on the ${PATH}
@@ -37,29 +37,24 @@ if( $outputFmt > 1 ) {
if( $opt_s ) {
# Standard diff, no playing around
-}
-if ( $opt_c ) {
+} elsif( $opt_c ) {
# Plain context diff
$diffOpts .= "-c ";
-}
-if( $opt_u ) {
+} elsif( $opt_u ) {
# Plain unified diff
$diffOpts .= "-u ";
-}
-if( $opt_p ) {
+} elsif( $opt_p ) {
# Colorized unified diff
# $diffOpts .= "-u ";
$diffOpts .= "--new-line-format='+ %l\n' ";
$diffOpts .= "--old-line-format='- %l\n' ";
$diffOpts .= "--unchanged-line-format=' %l\n' ";
-}
-if( $opt_C ) {
+} elsif( $opt_C ) {
$diffOpts .= "--changed-group-format='\n<<<<<<<<<<<<<<\n%<==============\n%>>>>>>>>>>>>>>>\n\n' ";
$diffOpts .= "--new-line-format='+ %l\n' ";
$diffOpts .= "--old-line-format='- %l\n' ";
$diffOpts .= "--unchanged-line-format=' %l\n' ";
-}
-if( $opt_H ) {
+} elsif( $opt_H ) {
$diffOpts .= "--changed-group-format='%<%>' ";
$diffOpts .= " --new-group-format='%>' ";
$diffOpts .= "--old-group-format='%<' ";