This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

sync with openwrt, 2018.02

  • Loading branch information...
The-BB committed Feb 12, 2018
1 parent 3835ef0 commit d3354edab627eecd2f115ece7ae80ac4c99de0de
Showing with 13 additions and 0 deletions.
  1. +13 −0 scripts/bundle-libraries.sh
@@ -97,6 +97,18 @@ _runas_so() {
}
}
_patch_ldso() {
_cp "$1" "$1.patched"
sed -i -e 's,/\(usr\|lib\|etc\)/,/###/,g' "$1.patched"
if "$1.patched" 2>&1 | grep -q -- --library-path; then
_mv "$1.patched" "$1"
else
echo "binary patched ${1##*/} not executable, using original" >&2
rm -f "$1.patched"
fi
}
for LDD in ${PATH//://ldd }/ldd; do
"$LDD" --version >/dev/null 2>/dev/null && break
LDD=""
@@ -135,6 +147,7 @@ for BIN in "$@"; do
[ -f "$token" -a ! -f "$dest" ] && {
_md "$ddir"
_cp "$token" "$dest"
[ -n "$LDSO" ] && _patch_ldso "$dest"
}
;; esac
done

0 comments on commit d3354ed

Please sign in to comment.