diff options
author | Frederic Lepied <flepied@mandriva.com> | 2000-02-28 14:40:08 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2000-02-28 14:40:08 +0000 |
commit | 60b9c1dc995df11222dab6b3abf2b6fdd34b0aef (patch) | |
tree | e97fe8145c17ad3e97e7ea35d7baaf347b650109 /strip_files | |
parent | 82f561ce59177878736b15a09d57d32446acf27e (diff) | |
download | spec-helper-60b9c1dc995df11222dab6b3abf2b6fdd34b0aef.tar spec-helper-60b9c1dc995df11222dab6b3abf2b6fdd34b0aef.tar.gz spec-helper-60b9c1dc995df11222dab6b3abf2b6fdd34b0aef.tar.bz2 spec-helper-60b9c1dc995df11222dab6b3abf2b6fdd34b0aef.tar.xz spec-helper-60b9c1dc995df11222dab6b3abf2b6fdd34b0aef.zip |
* use EXCLUDE_FROM_STRIP env variable to list files to exclude
from stripping.
Diffstat (limited to 'strip_files')
-rwxr-xr-x | strip_files | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/strip_files b/strip_files index fe3ef48..1b884a9 100755 --- a/strip_files +++ b/strip_files @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl #--------------------------------------------------------------- # Project : Linux-Mandrake # Module : spec-helper @@ -16,10 +16,20 @@ use File::Find; # for use by File::Find. It'll fill the following 3 arrays with anything # it finds: my (@shared_libs, @executables, @static_libs); +my $exclude_files=defined($ENV{EXCLUDE_FROM_STRIP}) ? split(' ',$ENV{EXCLUDE_FROM_STRIP}) : (); + sub testfile { return if -l $_ or -d $_; # Skip directories and symlinks always. $fn="$File::Find::dir/$_"; + + if ($exclude_files) { + # See if we were asked to exclude this file. + # Note that we have to test on the full filename, including directory. + foreach my $f ($exclude_files) { + return if ($fn=~m/\Q$f\E/); + } + } # Does its filename look like a shared library? if (m/.*\.so.*?/) { |