Sha256: a9d77b69d382d2cc3b3ad6fb8f0417f104f22e02a8451276cd1c64ecd319ac42
Contents?: true
Size: 428 Bytes
Versions: 9
Compression:
Stored size: 428 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
9 entries across 9 versions & 1 rubygems