Sha256: 597e7b7f023e0710eedf18fc5b83743c4f195cfd7dd7a3284ace6108cca4a988

Contents?: true

Size: 427 Bytes

Versions: 28

Compression:

Stored size: 427 Bytes

Contents

#!/usr/bin/env ruby

require 'fileutils'
include FileUtils::Verbose

msg = "Usage: #$0 EXECUTABLE DIR [LIB ..]"
executable = ARGV.shift or fail msg
dir = ARGV.shift or fail msg
dir = File.expand_path dir
mkdir_p dir

executable = `which #{executable}`.chomp
libs = `ldd #{executable}`.gsub(/^(?:.*?\s+=>\s+|\s+)(.*?)\(.*/, '\1').grep(/\S/).map { |x| x.strip }
libs.concat ARGV
cd dir
for l in libs
  cp l, File.basename(l)
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
utils-0.0.39 bin/chroot-libs
utils-0.0.38 bin/chroot-libs
utils-0.0.37 bin/chroot-libs
utils-0.0.36 bin/chroot-libs
utils-0.0.35 bin/chroot-libs
utils-0.0.34 bin/chroot-libs
utils-0.0.33 bin/chroot-libs
utils-0.0.32 bin/chroot-libs
utils-0.0.31 bin/chroot-libs
utils-0.0.30 bin/chroot-libs
utils-0.0.29 bin/chroot-libs
utils-0.0.28 bin/chroot-libs
utils-0.0.27 bin/chroot-libs
utils-0.0.26 bin/chroot-libs
utils-0.0.25 bin/chroot-libs
utils-0.0.24 bin/chroot-libs
utils-0.0.23 bin/chroot-libs
utils-0.0.22 bin/chroot-libs
utils-0.0.21 bin/chroot-libs
utils-0.0.20 bin/chroot-libs