1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-25 00:20:05 -07:00

pkg_strip: Clean up

This commit is contained in:
Dylan Araps 2020-05-24 11:42:56 +03:00
parent 0c805343b0
commit 18c304951d
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

11
kiss
View File

@ -444,13 +444,10 @@ pkg_strip() {
# Strip only files matching the below ELF types.
find "$pkg_dir/$1" -type f | while read -r file; do
case $(readelf -h "$file" 2>/dev/null) in
*" DYN "*) strip_opt=unneeded ;;
*" EXEC "*) strip_opt=all ;;
*" REL "*) strip_opt=debug ;;
*) continue
esac
strip "--strip-$strip_opt" "$file" 2>/dev/null
*" DYN "*) strip --strip-nneeded "$file" ;;
*" EXEC "*) strip --strip-all "$file" ;;
*" REL "*) strip --strip-debug "$file" ;;
esac 2>/dev/null
done 2>/dev/null ||:
}