X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=src%2Fstripper;h=f121d35919fb967c6469c54b32d4f791ea631480;hp=2b4feafe9063c50bf0c01795bd8ea887fcf21e19;hb=77c863a2f113404a7f30b8591b9972291328980b;hpb=7778e4da40e18c786333bdc28aba1752af3c87b8 diff --git a/src/stripper b/src/stripper index 2b4feafe90..f121d35919 100755 --- a/src/stripper +++ b/src/stripper @@ -1,4 +1,4 @@ -#!/tools/bin/bash +#!/usr/bin/env bash dirs="" excludes="/dev /proc /sys /run" @@ -43,15 +43,15 @@ function _strip() { 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' | + | file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped.*/\1/p' | while read file; do - _strip ${file} - done + _strip ${file} || exit $? + done || exit $? # 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 + _strip ${file} || exit $? + done || exit $? done