scripts: sercomm-pid.py: use uppercase hwid in pid
[openwrt/staging/stintel.git] / scripts / rstrip.sh
index 55caefc1a8cf463edb73b58d6de1e4ae376e14a7..e47960a941ae203810fc26f003d44d6df1b075ce 100755 (executable)
@@ -27,6 +27,7 @@ find $TARGETS -type f -a -exec file {} \; | \
   while read F S; do
     echo "$SELF: $F: $S"
        [ "${S}" = "relocatable" ] && {
+               [ "${F##*.}" == "o" ] && continue
                eval "$STRIP_KMOD $F"
        } || {
                b=$(stat -c '%a' $F)
@@ -34,7 +35,7 @@ find $TARGETS -type f -a -exec file {} \; | \
                        old_rpath="$($PATCHELF --print-rpath $F)"; new_rpath=""
                        for path in $old_rpath; do
                                case "$path" in
-                                       /lib/[^/]*|/usr/lib/[^/]*|\$ORIGIN/*) new_rpath="${new_rpath:+$new_rpath:}$path" ;;
+                                       /lib/[^/]*|/usr/lib/[^/]*|\$ORIGIN/*|\$ORIGIN) new_rpath="${new_rpath:+$new_rpath:}$path" ;;
                                        *) echo "$SELF: $F: removing rpath $path" ;;
                                esac
                        done