1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-25 08:30: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. # Strip only files matching the below ELF types.
find "$pkg_dir/$1" -type f | while read -r file; do find "$pkg_dir/$1" -type f | while read -r file; do
case $(readelf -h "$file" 2>/dev/null) in case $(readelf -h "$file" 2>/dev/null) in
*" DYN "*) strip_opt=unneeded ;; *" DYN "*) strip --strip-nneeded "$file" ;;
*" EXEC "*) strip_opt=all ;; *" EXEC "*) strip --strip-all "$file" ;;
*" REL "*) strip_opt=debug ;; *" REL "*) strip --strip-debug "$file" ;;
*) continue esac 2>/dev/null
esac
strip "--strip-$strip_opt" "$file" 2>/dev/null
done 2>/dev/null ||: done 2>/dev/null ||:
} }