Script for copy libraries from executable
This commit is contained in:
parent
63eb9b5c56
commit
b5f647656a
17
packelf-copylibs.sh
Executable file
17
packelf-copylibs.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
if [ -z "${1}" ] ; then
|
||||||
|
echo "$0 <path-elf> <path-to-copy-libraries>"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
if [ -z "${2}" ] ; then
|
||||||
|
echo "$0 <path-elf> <path-to-copy-libraries>"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
libs="$(ldd "${1}" | grep -F '/' | sed -E 's|[^/]*/([^ ]+).*?|/\1|')"
|
||||||
|
for library in ${libs} ; do
|
||||||
|
cp -L ${library} ${2}
|
||||||
|
echo "Copied ${library} to ${2}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user