-for dir in ${dirs}; do
- # Strip shared objects.
- find ${dir} -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
- | file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p' |
- while read file; do
- _strip ${file}
- done
-
- # Strip static archives.
- find ${dir} -name \*.a -a -exec file {} \; \
- | grep 'current ar archive' | sed -n -e 's/^\(.*\):[ ]*current ar archive/\1/p' |
- while read file; do
- _strip ${file}
- done
+for path in ${paths[@]}; do
+ for file in $(find -H "${path}" -xdev "${excludes[@]}" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) 2>/dev/null); do
+ _strip "${file}" || exit $?
+ done