aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfix-eol10
-rwxr-xr-xstrip_files9
2 files changed, 12 insertions, 7 deletions
diff --git a/fix-eol b/fix-eol
index f4a7590..9648855 100755
--- a/fix-eol
+++ b/fix-eol
@@ -23,11 +23,13 @@ $exclude_pattern = qr/$exclude_pattern/;
find(\&convert, $buildroot);
sub convert {
- # reject symlinks
- return unless -f $_;
- # reject binary files
+ # skip symlinks
+ return if -l $_;
+ # skip directories
+ return if -d $_;
+ # skip binary files
return unless -T $_;
- # reject excluded files
+ # skip excluded files
return if $File::Find::name =~ $exclude_pattern;
# check if first line has less than 80 characters and ends with \r\n
diff --git a/strip_files b/strip_files
index 2a2a0a6..50a57ef 100755
--- a/strip_files
+++ b/strip_files
@@ -26,10 +26,13 @@ sub expensive_test {
}
sub testfile() {
- local $_ = $_;
- return if -l $_ || -d $_; # Skip directories and symlinks always.
- # reject excluded files
+ # skip symlinks
+ return if -l $_;
+ # skip directories
+ return if -d $_;
+ # skip excluded files
return if $File::Find::name =~ $exclude_pattern;
+
my $fn = "$File::Find::dir/$_";
# Does its filename look like a shared library?