#!/usr/local/bin/perl # -*-Fundamental-*- # CAVEAT - this is not a "finished" tool by any stretch of the # imagination, and there is virtually 0 chance you'll be able to use # it in your own context without tweaking it. (AT LEAST the pathnames # in the main while() loop at the bottom!) # # perl_template - please see the comment at the end! #eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # & eval 'exec perl -S $0 $argv:q' # if 0; # THE PRECEEDING STUFF EXECS perl via $PATH use Carp; $| = 1; ($Myname = $0) =~ s%^.*/%%; $Usage = <) { $y_ = $_; $t_ = ; $y_ =~ s/\$(Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State).*\$/\$XXX\$/g; $t_ =~ s/\$(Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State).*\$/\$XXX\$/g; if ($y_ ne $t_) { close Y; close T; return 0; } } $t_ = ; close Y; close T; if ($t_ eq "") { return 1; } else { return 0; } } # option switch variables get defaults here... $Valopt = "default"; $Boolopt = 0; while ($#ARGV >= 0) { if ($ARGV[0] eq "-boolopt") { $Boolopt = 1; shift; next; } elsif ($ARGV[0] eq "-valopt") { shift; if ($ARGV[0] < 0) { &usage; } $Valopt = $ARGV[0]; shift; next; } elsif ($ARGV[0] eq "-help") { &help; } elsif ($ARGV[0] =~ /^-/) { &usage; } if ($Args ne "") { $Args .= " "; } push(@Args, $ARGV[0]); shift; } while (<>) { chop; $file = $_; if (! &same("/rlse/4.3.3/$file", "/rlse/4.3.4/$file")) { print "\n\n===== $file\n"; system "diff /rlse/4.3.3/$file /rlse/4.3.4/$file"; } else { print "$file OK\n"; } } # # Note to the esteemed reader: # # This file is a quick-start template perl script, meant to make it # easy to get a new script off the ground. It's _also_ quite # possible, therefore, that you're looking at a *descendant* of # "perl_template", which might explain certain oddities. (E.g., code # with variable names like): # # my $Valopt = "default"; # my $Boolopt = 0; # # (or other cruft that seems to have nothing to do with the task at # hand, or incomplete usage information, and so on. Different script # based hereupon will be finished to different levels of goodness, # depending on the intended purpose, lifetime, audience, my whims, # and the time avialable for applying a spit-shine. #