#!/ bin/sh
binaries=`find /usr/local/codeblocks -type f \( -perm +111 -or -name "*.ko" \)`
# Strip ELF binaries
for f in $binaries
do
file_output=`file "$f"`
case $file_output in
*ELF*", not stripped")
;;
*ELF*", stripped")
echo "WARNING: "`echo $f | sed -e "s,^$RPM_BUILD_ROOT/*,/,"`" is already stripped!"
continue
;;
*)
continue
;;
esac
strip [--strip-all | --strip-unneeded] "$f"
done
I took the /usr/lib/rpm/find-debuginfo.sh script of suse 10.0 (the one of 10.1 is different, don't know why) and removed unneeded things (object copying to .debug files and rpm specific things). I don't know whether
--strip-all is a good idea or not, I think
--strip-unneeded won't cause problems (I hope so :lol:).
Save this as a file, remove the space in the first line between "/" and "bash", replace
[--strip-all | --strip-unneeded] with one of both options and run it as root with
sh strip_codeblocks.sh. You can check whether te binaries have been stripped with for example
file /usr/local/codeblocks/bin/codeblocks. A "stripped" should appear at the end
I havn't checked whether the script really works, but theoretically it should :lol: