diff options
author | Timm Bäder <tbaeder@redhat.com> | 2021-11-05 11:29:41 +0100 |
---|---|---|
committer | Michal Domonkos <mdomonko@redhat.com> | 2022-07-01 10:52:14 +0200 |
commit | f5e450e45682042b59b7fd096f759955f0838378 (patch) | |
tree | 1b957adde2c2613c4146ad4aa22791ce782e0291 | |
parent | 82f9be4424a2c7961ace7f04ec281a76a1d27cfc (diff) | |
download | rpm-f5e450e45682042b59b7fd096f759955f0838378.tar.gz |
remove-la-files: Use file to check for libtool files
Try to minimize accidentally removed .la files that aren't libtool .la
files.
(cherry picked from commit 432a91151a1f6d19d25e85b0f1af0a0ab6addc46)
-rwxr-xr-x | scripts/brp-remove-la-files | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/brp-remove-la-files b/scripts/brp-remove-la-files index f184139c7..56fa25adf 100755 --- a/scripts/brp-remove-la-files +++ b/scripts/brp-remove-la-files @@ -5,4 +5,6 @@ if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_BUILD_ROOT" = "/" ]; then exit 0 fi -find "$RPM_BUILD_ROOT" -name "*.la" -type f -delete +find "$RPM_BUILD_ROOT" -type f -name '*.la' 2>/dev/null -print0 | + xargs --null grep --fixed-strings '.la - a libtool library file' --files-with-matches --null | + xargs --null rm --force |