X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=scripts%2Frstrip.sh;h=e42caa53a296f5e4245d5228711f93831141600f;hb=bd1c29df74d3174c654491641179f2199e6b2ce8;hp=6dd44f2ed272c65e84fbedc8d90a42d7dc627864;hpb=d0e1033a2682e660e7da3dd7c396ed33668cfceb;p=oweals%2Fopenwrt.git diff --git a/scripts/rstrip.sh b/scripts/rstrip.sh index 6dd44f2ed2..e42caa53a2 100755 --- a/scripts/rstrip.sh +++ b/scripts/rstrip.sh @@ -45,10 +45,13 @@ find $TARGETS -type f -a -exec file {} \; | \ IFS=":" while read F S; do echo "$SELF: $F:$S" - [ "${F##*\.}" = "o" -o "${F##*\.}" = "ko" ] && { + [ "${S}" = "relocatable" ] && { eval "$STRIP_KMOD -w -K '__param*' -K '__mod*' $(find_modparams "$F")$F" } || { + b=$(stat -c '%a' $F) eval "$STRIP $F" + a=$(stat -c '%a' $F) + [ "$a" = "$b" ] || chmod $b $F } done true