projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ltq-adsl: disable mips16 support
[openwrt.git]
/
scripts
/
bundle-libraries.sh
diff --git
a/scripts/bundle-libraries.sh
b/scripts/bundle-libraries.sh
index
34cd08e
..
869286b
100755
(executable)
--- a/
scripts/bundle-libraries.sh
+++ b/
scripts/bundle-libraries.sh
@@
-1,9
+1,8
@@
#!/usr/bin/env bash
#
# Script to install host system binaries along with required libraries.
#!/usr/bin/env bash
#
# Script to install host system binaries along with required libraries.
-# Refer to the --help output for more information.
#
#
-# Copyright (C) 2012 Jo-Philipp Wich <jow@openwrt.org>
+# Copyright (C) 2012
-2013
Jo-Philipp Wich <jow@openwrt.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@
-74,16
+73,12
@@
for BIN in "$@"; do
*) echo " * lib: ${token##*/}" ;;
esac
*) echo " * lib: ${token##*/}" ;;
esac
- dest="$DIR/bundled/lib/${token#
*/lib
*/}"
+ dest="$DIR/bundled/lib/${token#
#
*/}"
ddir="${dest%/*}"
[ -f "$token" -a ! -f "$dest" ] && {
_md "$ddir"
_cp "$token" "$dest"
ddir="${dest%/*}"
[ -f "$token" -a ! -f "$dest" ] && {
_md "$ddir"
_cp "$token" "$dest"
-
- case "$token" in */tls/*.so*)
- _cp "${token%/tls/*}/${token##*/}" "$DIR/bundled/lib/${token##*/}"
- ;; esac
}
;; esac
done
}
;; esac
done
@@
-94,17
+89,19
@@
for BIN in "$@"; do
if [ -n "$LDSO" ]; then
_cp "$BIN" "$DIR/bundled/${BIN##*/}"
if [ -n "$LDSO" ]; then
_cp "$BIN" "$DIR/bundled/${BIN##*/}"
- [ -x "$DIR/bundled/run.sh" ] || {
- cat <<-EOF > "$DIR/bundled/run.sh"
+ RUN="${LDSO#ld-}"; RUN="run-${RUN%%.so*}.sh"
+
+ [ -x "$DIR/bundled/$RUN" ] || {
+ cat <<-EOF > "$DIR/bundled/$RUN"
#!/usr/bin/env bash
dir="\$(dirname "\$0")"
bin="\$(basename "\$0")"
exec -a "\$0" "\$dir/bundled/lib/$LDSO" --library-path "\$dir/bundled/lib" "\$dir/bundled/\$bin" "\$@"
EOF
#!/usr/bin/env bash
dir="\$(dirname "\$0")"
bin="\$(basename "\$0")"
exec -a "\$0" "\$dir/bundled/lib/$LDSO" --library-path "\$dir/bundled/lib" "\$dir/bundled/\$bin" "\$@"
EOF
- chmod ${VERBOSE:+-v} 0755 "$DIR/bundled/
run.sh
"
+ chmod ${VERBOSE:+-v} 0755 "$DIR/bundled/
$RUN
"
}
}
- _ln "./bundled/
run.sh
" "$DIR/${BIN##*/}"
+ _ln "./bundled/
$RUN
" "$DIR/${BIN##*/}"
# is a static executable or non-elf binary
else
# is a static executable or non-elf binary
else