Created
September 24, 2013 23:13
-
-
Save lutter/6692626 to your computer and use it in GitHub Desktop.
Little test script to try out libarchive. Run as 'bundle exec ruby unpack spec/fixtures/iso/tiny.iso /tmp/isotest' from the razor-server checkout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env jruby | |
require 'archive' | |
unless ARGV.size == 2 | |
puts "Usage: unpack ISO DIRECTORY" | |
puts "Unbpack ISO into the DIRECTORY" | |
end | |
destination = Pathname.new(ARGV[1]) | |
destination.mkpath | |
Archive.extract(ARGV[0], destination) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment