Loading collect-binaries.bash +27 −12 Original line number Diff line number Diff line Loading @@ -58,6 +58,20 @@ copy() { fi } copy_bin() { local bin=$1 ldd "$bin" | while read dep; do local dep=${dep% (*} case $dep in *'=>'*) dep=${dep#*=> } ;; /*) ;; *) continue ;; esac copy $dep done || true copy $bin } trap missing EXIT declare -a TARGETS=() Loading @@ -72,15 +86,16 @@ until [[ $# -eq 0 ]]; do shift done if [[ ${#TARGETS[*]} -gt 0 ]]; then for bin in "${TARGETS[@]}"; do ldd "$bin" | while read dep; do dep=${dep% (*} case $dep in *'=>'*) dep=${dep#*=> } ;; /*) ;; *) continue ;; esac copy $dep done || true copy $bin copy_bin "$bin" done else [[ -t 0 ]] && cat <<-END_TXT >&2 No files specified in arguments; are you sure you meant to do that? Reading files list from terminal input: END_TXT while read bin; do copy_bin "$bin" done fi Loading
collect-binaries.bash +27 −12 Original line number Diff line number Diff line Loading @@ -58,6 +58,20 @@ copy() { fi } copy_bin() { local bin=$1 ldd "$bin" | while read dep; do local dep=${dep% (*} case $dep in *'=>'*) dep=${dep#*=> } ;; /*) ;; *) continue ;; esac copy $dep done || true copy $bin } trap missing EXIT declare -a TARGETS=() Loading @@ -72,15 +86,16 @@ until [[ $# -eq 0 ]]; do shift done if [[ ${#TARGETS[*]} -gt 0 ]]; then for bin in "${TARGETS[@]}"; do ldd "$bin" | while read dep; do dep=${dep% (*} case $dep in *'=>'*) dep=${dep#*=> } ;; /*) ;; *) continue ;; esac copy $dep done || true copy $bin copy_bin "$bin" done else [[ -t 0 ]] && cat <<-END_TXT >&2 No files specified in arguments; are you sure you meant to do that? Reading files list from terminal input: END_TXT while read bin; do copy_bin "$bin" done fi