add nostrip function to certain libraries

This commit is contained in:
emmett1
2019-05-27 15:34:07 +08:00
parent 5f335ac1e9
commit affce504f8

View File

@@ -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 ;;