Download + Extract

12 views
Skip to first unread message

Shanon McQuay

unread,
Dec 2, 2010, 9:55:08 PM12/2/10
to babushka_app
Hey,

I would like to automate the installation of RubyMine on linux.

All I really want to do is grab a tarball and extract it into an
appropriate directory.

What's the best way to achieve this using babushka?

Thanks,
Shanon

Ben Hoskings

unread,
Dec 3, 2010, 10:06:12 PM12/3/10
to babush...@googlegroups.com
This is the manual case:

dep "some tarball" do
  helper :uri do
  end
  met? {
    # Whatever checks you want
  }
  meet {
    # This downloads the resource to ~/.babushka/downloads/… and then
    # extracts it to ~/.babushka/build/…
    Resource.extract uri do
      # This block yields within the extracted source directory, so you
      # could do something like this:
      shell("rake setup")
    end
  }
end

But, if the contents of the tarball is an .app bundle, then there's already a template for that (see deps/templates/app.rb in the babushka source):

dep "RubyMine.app" do
end

—Ben


Shanon McQuay

unread,
Dec 4, 2010, 4:52:20 AM12/4/10
to babushka_app
Excellent, thank you sir.

On Dec 4, 2:06 pm, Ben Hoskings <b...@hoskings.net> wrote:
> This is the manual case:
>
> dep "some tarball" do
>   helper :uri do
>     "http://path/to/tarball"
>   end
>   met? {
>     # Whatever checks you want
>   }
>   meet {
>     # This downloads the resource to ~/.babushka/downloads/… and then
>     # extracts it to ~/.babushka/build/…
>     Resource.extract uri do
>       # This block yields within the extracted source directory, so you
>       # could do something like this:
>       shell("rake setup")
>     end
>   }
> end
>
> But, if the contents of the tarball is an .app bundle, then there's already
> a template for that (see deps/templates/app.rb in the babushka source):
>
> dep "RubyMine.app" do
>   source "http://path/to/tarball"
> end
>
> —Ben
>
> On 3 December 2010 13:55, Shanon McQuay <shanonmcq...@gmail.com> wrote:
>
>
>
> > Hey,
>
> > I would like to automate the installation of RubyMine on linux.
>
> > All I really want to do is grab a tarball and extract it into an
> > appropriate directory.
>
> > What's the best way to achieve this using babushka?
>
> > Thanks,
> > Shanon
>
> > --
> > To post, email babush...@googlegroups.com
> > To unsubscribe, email babushka_app...@googlegroups.com<babushka_app%2Bunsubscribe@google groups.com>
Reply all
Reply to author
Forward
0 new messages