script to copy shared libraries to your chroot

This commit is contained in:
xfnw 2021-05-02 13:11:56 -04:00
parent 8caabeaf8b
commit 6bf5d7d503
1 changed files with 10 additions and 0 deletions

10
bin/ldcp Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
set -e
mkcp(){
mkdir -p ".$(dirname $1)"
cp "$1" ".$1"
}
export -f mkcp
ldd $(which $1) | awk '{if ($3!="") print $3; else print $1}' | grep '^/' | xargs -I% bash -c 'mkcp %'