You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
727 B
36 lines
727 B
18 years ago
|
#!/usr/bin/env bash
|
||
19 years ago
|
#
|
||
|
# Copyright (C) 2006 OpenWrt.org
|
||
|
#
|
||
|
# This is free software, licensed under the GNU General Public License v2.
|
||
|
# See /LICENSE for more information.
|
||
|
#
|
||
|
|
||
20 years ago
|
|
||
|
SELF=${0##*/}
|
||
|
|
||
|
[ -z "$STRIP" ] && {
|
||
|
echo "$SELF: strip command not defined (STRIP variable not set)"
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
|
TARGETS=$*
|
||
|
|
||
|
[ -z "$TARGETS" ] && {
|
||
|
echo "$SELF: no directories / files specified"
|
||
|
echo "usage: $SELF [PATH...]"
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
19 years ago
|
find $TARGETS -type f -a -exec file {} \; | \
|
||
19 years ago
|
sed -n -e 's/^\(.*\):.*ELF.*\(executable\|relocatable\|shared object\).*,.* stripped/\1:\2/p' | \
|
||
20 years ago
|
(
|
||
|
IFS=":"
|
||
|
while read F S; do
|
||
|
echo "$SELF: $F:$S"
|
||
19 years ago
|
[ "${F##*\.}" = "o" -o "${F##*\.}" = "ko" ] && \
|
||
|
eval "$STRIP_KMOD $F" || \
|
||
|
eval "$STRIP $F"
|
||
20 years ago
|
done
|
||
|
)
|