diff options
author | joe <joe@FreeBSD.org> | 2001-09-01 20:42:39 +0800 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2001-09-01 20:42:39 +0800 |
commit | 386900433680d98dcca259f32752ae97edaa50ab (patch) | |
tree | 18d662d2005ebea690c31c288f4aa15f147dd85b | |
parent | 54f442c366562d42069d06eda9b567b1a6a0c89a (diff) | |
download | freebsd-ports-gnome-386900433680d98dcca259f32752ae97edaa50ab.tar.gz freebsd-ports-gnome-386900433680d98dcca259f32752ae97edaa50ab.tar.zst freebsd-ports-gnome-386900433680d98dcca259f32752ae97edaa50ab.zip |
Contract some syntax; 'chomp not chop'.
-rwxr-xr-x | CVSROOT/commit_prep.pl | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/CVSROOT/commit_prep.pl b/CVSROOT/commit_prep.pl index 8960bddafeed..ebd3013efeb4 100755 --- a/CVSROOT/commit_prep.pl +++ b/CVSROOT/commit_prep.pl @@ -110,10 +110,8 @@ sub check_version { my $rname; my $version; - if (! -f $filename) { - return(0); # not present - either removed or let - # cvs deal with it. - } + # not present - either removed or let cvs deal with it. + return 0 unless -f $filename; open FILE, $filename or die "Cannot open $filename, stopped\n"; # requiring the header within the first 'n' lines isn't useful. @@ -132,12 +130,11 @@ sub check_version { $path = $directory . "/" . $filename; open(EX, "<$exclude") || die("cannot open $exclude: $!"); while (<EX>) { - chop; + chomp; my $ex_entry = $_; - if ($ex_entry =~ /^#/) { - next; - } + next if $ex_entry =~ /^#/; + if ($path =~ /$ex_entry/) { close(EX); return(0); |