Skip to content

Instantly share code, notes, and snippets.

@sandrods
Created September 20, 2011 20:44
Show Gist options
  • Select an option

  • Save sandrods/1230272 to your computer and use it in GitHub Desktop.

Select an option

Save sandrods/1230272 to your computer and use it in GitHub Desktop.

Revisions

  1. sandrods renamed this gist Sep 20, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. sandrods created this gist Sep 20, 2011.
    18 changes: 18 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #!/usr/bin/env ruby

    require 'fileutils'

    f = FileUtils
    file = ARGV[0]

    dir = "tmp.#{Time.now}"

    f.mkdir_p dir

    f.mv file, dir

    f.cd dir

    %x( unrar e #{file} )

    %x( unzip "*.zip" -d . )