mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 08:30:05 -07:00
kiss: clean up
This commit is contained in:
parent
bbb2d622d9
commit
edc9670ad3
11
kiss
11
kiss
@ -37,8 +37,7 @@ die() {
|
|||||||
|
|
||||||
contains() {
|
contains() {
|
||||||
# Check if a "string list" contains a word.
|
# Check if a "string list" contains a word.
|
||||||
case " $1 " in *" $2 "*) return 0; esac
|
case " $1 " in *" $2 "*) return 0; esac; return 1
|
||||||
return 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt() {
|
prompt() {
|
||||||
@ -236,15 +235,15 @@ 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=--strip-unneeded ;;
|
*" DYN "*) strip_opt=unneeded ;;
|
||||||
*" EXEC "*) strip_opt=--strip-all ;;
|
*" EXEC "*) strip_opt=all ;;
|
||||||
*" REL "*) strip_opt=--strip-debug ;;
|
*" REL "*) strip_opt=debug ;;
|
||||||
*) 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_opt" "$file" 2>/dev/null ||:
|
strip "--strip-$strip_opt" "$file" 2>/dev/null ||:
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user