Skip to content

Instantly share code, notes, and snippets.

@lutter
Created Sep 24, 2013
Embed
What would you like to do?
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
#! /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