aboutsummaryrefslogtreecommitdiffstats
path: root/compress_files
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2008-02-10 14:38:25 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2008-02-10 14:38:25 +0000
commit6a5879393063adcc5b2c53b4d0289d0217981fe6 (patch)
tree4c9bcdd26707e72507a7d95dc3fa4436a2b82b16 /compress_files
parentb95abf1988a7ba50c19ef14c4a4007e0de02c222 (diff)
downloadspec-helper-6a5879393063adcc5b2c53b4d0289d0217981fe6.tar
spec-helper-6a5879393063adcc5b2c53b4d0289d0217981fe6.tar.gz
spec-helper-6a5879393063adcc5b2c53b4d0289d0217981fe6.tar.bz2
spec-helper-6a5879393063adcc5b2c53b4d0289d0217981fe6.tar.xz
spec-helper-6a5879393063adcc5b2c53b4d0289d0217981fe6.zip
more cleanup
Diffstat (limited to 'compress_files')
-rwxr-xr-xcompress_files11
1 files changed, 6 insertions, 5 deletions
diff --git a/compress_files b/compress_files
index 8fc5a1b..0e7beda 100755
--- a/compress_files
+++ b/compress_files
@@ -160,12 +160,13 @@ sub xargs {
# Check if a file is a .so man page, for use by File::Find.
sub find_so_man() {
- local $_ = $_;
+ # skip symlinks
+ return if -l $_;
+ # skip directories
+ return if -d $_;
# The -s test is becuase a .so file tends to be small. We don't want
# to open every man page. 1024 is arbitrary.
- if (! -f $_ || -s $_ > 1024) {
- return;
- }
+ return if -s $_ > 1024;
# skip excluded files
return if $File::Find::name =~ $exclude_pattern;
@@ -183,7 +184,7 @@ sub find_so_man() {
$solink = "../$solink";
}
- push @sofiles, "$File::Find::dir/$_";
+ push @sofiles, $File::Find::name;
push @sodests, $solink;
}
}