add to strip

This commit is contained in:
emmett1
2019-04-29 17:24:18 +08:00
parent aaf9f5f3f5
commit 9f98cc6b09

View File

@@ -279,20 +279,20 @@ strip_files() {
find . -type f 2>/dev/null | while read -r binary ; do
case "$(file -bi "$binary")" in
*application/x-sharedlib*) # Libraries (.so)
strip --strip-unneeded "$binary" ;;
strip --strip-unneeded "$binary" 2>/dev/null ;;
*application/x-pie-executable*) # Libraries (.so)
strip --strip-unneeded "$binary" ;;
strip --strip-unneeded "$binary" 2>/dev/null ;;
*application/x-archive*) # Libraries (.a)
strip --strip-debug "$binary" ;;
strip --strip-debug "$binary" 2>/dev/null ;;
*application/x-object*)
case "$binary" in
*.ko) # Kernel module
strip --strip-unneeded "$binary" ;;
strip --strip-unneeded "$binary" 2>/dev/null ;;
*)
continue;;
esac;;
*application/x-executable*) # Binaries
strip --strip-all "$binary" ;;
strip --strip-all "$binary" 2>/dev/null ;;
*)
continue ;;
esac