aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2008-05-14 08:31:58 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2008-05-14 08:31:58 +0000
commit321615496399b91185ec4e4c391e01e45c8afac0 (patch)
treedf95185628fce3e62424c06e035ccccb7a7ff873
parentbc37609ac617acccef65987381c32a5e673eae20 (diff)
downloadspec-helper-321615496399b91185ec4e4c391e01e45c8afac0.tar
spec-helper-321615496399b91185ec4e4c391e01e45c8afac0.tar.gz
spec-helper-321615496399b91185ec4e4c391e01e45c8afac0.tar.bz2
spec-helper-321615496399b91185ec4e4c391e01e45c8afac0.tar.xz
spec-helper-321615496399b91185ec4e4c391e01e45c8afac0.zip
change strategy when recursing files from accepting everything but some exceptions to rejecting everything but files, for more robustness
-rwxr-xr-xfix_eol6
-rwxr-xr-xstrip_and_check_elf_files6
2 files changed, 4 insertions, 8 deletions
diff --git a/fix_eol b/fix_eol
index c546fed..ea14c29 100755
--- a/fix_eol
+++ b/fix_eol
@@ -23,10 +23,8 @@ $exclude_pattern = qr/$exclude_pattern/;
find(\&convert, $buildroot);
sub convert {
- # skip symlinks
- return if -l $_;
- # skip directories
- return if -d $_;
+ # skip everything but files
+ return unless -f $_;
# skip binary files
return unless -T $_;
# skip excluded files
diff --git a/strip_and_check_elf_files b/strip_and_check_elf_files
index 7b9d28a..2f56bc0 100755
--- a/strip_and_check_elf_files
+++ b/strip_and_check_elf_files
@@ -57,10 +57,8 @@ sub expensive_test {
# for use by File::Find. It'll fill the following 3 arrays with anything
# it finds:
sub keep_wanted() {
- # skip symlinks
- return if -l $_;
- # skip directories
- return if -d $_;
+ # skip everything but files
+ return unless -f $_;
# Does its filename look like a shared library?
if (m/\.so/) {