freewrt_2_0
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 | # $FreeWRT$
|
|---|
| 3 | #-
|
|---|
| 4 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 5 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 6 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 7 |
|
|---|
| 8 | SELF=${0##*/}
|
|---|
| 9 |
|
|---|
| 10 | [ -z "$STRIP" ] && {
|
|---|
| 11 | echo "$SELF: strip command not defined (STRIP variable not set)"
|
|---|
| 12 | exit 1
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | TARGETS=$*
|
|---|
| 16 |
|
|---|
| 17 | [ -z "$TARGETS" ] && {
|
|---|
| 18 | echo "$SELF: no directories / files specified"
|
|---|
| 19 | echo "usage: $SELF [PATH...]"
|
|---|
| 20 | exit 1
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | find $TARGETS -type f -a -exec file {} \; | \
|
|---|
| 24 | sed -n -e 's/^\(.*\):.*ELF.*\(executable\|relocatable\|shared object\).*, not stripped/\1:\2/p' | \
|
|---|
| 25 | (
|
|---|
| 26 | IFS=":"
|
|---|
| 27 | while read F S; do
|
|---|
| 28 | echo "$SELF: $F:$S"
|
|---|
| 29 | eval "$STRIP $F"
|
|---|
| 30 | done
|
|---|
| 31 | )
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.