mirror of
https://github.com/outbackdingo/scratchpkg.git
synced 2026-02-06 01:16:34 +00:00
add nostrip function to certain libraries
This commit is contained in:
14
pkgbuild
14
pkgbuild
@@ -264,7 +264,19 @@ removelibtool() {
|
||||
}
|
||||
|
||||
strip_files() {
|
||||
find . -type f 2>/dev/null | while read -r binary ; do
|
||||
local xstrip
|
||||
local FILTER
|
||||
|
||||
if [ "$nostrip" ]; then
|
||||
for i in ${nostrip[@]}; do
|
||||
xstrip="$xstrip -e $i"
|
||||
done
|
||||
FILTER="grep -v $xstrip"
|
||||
else
|
||||
FILTER="cat"
|
||||
fi
|
||||
|
||||
find . -type f -printf "%P\n" 2>/dev/null | $FILTER | while read -r binary ; do
|
||||
case "$(file -bi "$binary")" in
|
||||
*application/x-sharedlib*) # Libraries (.so)
|
||||
strip --strip-unneeded "$binary" 2>/dev/null ;;
|
||||
|
||||
Reference in New Issue
Block a user