mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-11-04 14:05:41 -07:00
kiss: faster stripping
This commit is contained in:
parent
03073b8d2c
commit
9ef498e308
21
kiss
21
kiss
@ -278,22 +278,31 @@ pkg_strip() {
|
|||||||
|
|
||||||
# Strip only files matching the below mime-types from the package
|
# Strip only files matching the below mime-types from the package
|
||||||
# directory. No alternative to 'file' here sadly.
|
# directory. No alternative to 'file' here sadly.
|
||||||
find "$pkg_dir/$1" -type f | while read -r binary; do
|
find "$pkg_dir/$1" -type f -exec file -i {} + |
|
||||||
case $(file -bi "$binary") in
|
while IFS=': ' read -r bin mime; do
|
||||||
application/x-sharedlib*|application/x-pie-executable*)
|
case $mime in
|
||||||
|
application/x-sharedlib*|\
|
||||||
|
application/x-pie-executable*)
|
||||||
strip_opts=--strip-unneeded
|
strip_opts=--strip-unneeded
|
||||||
;;
|
;;
|
||||||
|
|
||||||
application/x-archive*) strip_opts=--strip-debug ;;
|
application/x-archive*)
|
||||||
application/x-executable*) strip_opts=--strip-all ;;
|
strip_opts=--strip-debug
|
||||||
|
;;
|
||||||
|
|
||||||
|
application/x-executable*)
|
||||||
|
strip_opts=--strip-all
|
||||||
|
;;
|
||||||
|
|
||||||
*) continue ;;
|
*) continue ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Suppress errors here as some binaries and libraries may
|
# Suppress errors here as some binaries and libraries may
|
||||||
# fail to strip. This is OK.
|
# fail to strip. This is OK.
|
||||||
strip "$strip_opts" "$binary" 2>/dev/null ||:
|
strip "$strip_opts" "$bin" 2>/dev/null &
|
||||||
done
|
done
|
||||||
|
|
||||||
|
wait
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_fixdeps() {
|
pkg_fixdeps() {
|
||||||
|
Loading…
Reference in New Issue
Block a user