diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-11-29 10:16:47 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-11-29 10:16:47 +0000 |
commit | 6818c0d32fd413610a7a19f20663420a35d84d6a (patch) | |
tree | dea4388aa62129821d64ff3fcbc5f7c1b7b7f2b8 /kiss | |
parent | 10765a73f513656d48007a09599ae5f74ed55323 (diff) | |
download | cpt-6818c0d32fd413610a7a19f20663420a35d84d6a.tar.gz |
kiss: clean up
FossilOrigin-Name: 3765918429f0075a2d17245f5886c344f339021e3a0ca7bb5094911dc9da1646
Diffstat (limited to 'kiss')
-rwxr-xr-x | kiss | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -37,8 +37,7 @@ die() { contains() { # Check if a "string list" contains a word. - case " $1 " in *" $2 "*) return 0; esac - return 1 + case " $1 " in *" $2 "*) return 0; esac; return 1 } prompt() { @@ -236,15 +235,15 @@ pkg_strip() { # Strip only files matching the below ELF types. find "$pkg_dir/$1" -type f | while read -r file; do case $(readelf -h "$file" 2>/dev/null) in - *" DYN "*) strip_opt=--strip-unneeded ;; - *" EXEC "*) strip_opt=--strip-all ;; - *" REL "*) strip_opt=--strip-debug ;; + *" DYN "*) strip_opt=unneeded ;; + *" EXEC "*) strip_opt=all ;; + *" REL "*) strip_opt=debug ;; *) continue esac # Suppress errors here as some binaries and libraries may # fail to strip. This is OK. - strip "$strip_opt" "$file" 2>/dev/null ||: + strip "--strip-$strip_opt" "$file" 2>/dev/null ||: done } |