ldcp 191 B

1234567891011
  1. #!/bin/bash
  2. set -e
  3. mkcp(){
  4. mkdir -p ".$(dirname $1)"
  5. cp "$1" ".$1"
  6. }
  7. export -f mkcp
  8. ldd $(which $1) | awk '{if ($3!="") print $3; else print $1}' | grep '^/' | xargs -I% bash -c 'mkcp %'