kiss: Silently skip stripping if dependencies aren't available.

This commit is contained in:
Dylan Araps 2020-05-21 11:09:31 +03:00
parent eaa4f3410c
commit 228e52f1ca
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

12
kiss
View File

@ -429,19 +429,9 @@ pkg_strip() {
log "$1" "Stripping binaries and libraries"
command -v strip >/dev/null || {
war "strip not found, skipping binary stripping"
return 0
}
command -v readelf >/dev/null || {
war "readelf not found, skipping binary stripping"
return 0
}
# Strip only files matching the below ELF types.
find "$pkg_dir/$1" -type f | while read -r file; do
case $(readelf -h "$file") in
case $(readelf -h "$file" 2>/dev/null) in
*" DYN "*) strip_opt=unneeded ;;
*" EXEC "*) strip_opt=all ;;
*" REL "*) strip_opt=debug ;;