Simple shell scripts with ruby
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
README.markdown
TODO
test.rb

README.markdown

R2shell

R2shell simplifies writing simple shell-like scripts in ruby.

Dependencies

  • Ruby2Ruby
  • ParseTree

Install

gem install astrails-r2shell --source http://gems.github.com/

Example

R2shell do
  rm "-rf", "/tmp/build-foo"
  mkdir "-p", "/tmp/build-foo"
  cd "/tmp/build-foo"
  wget "http://...../foo.tgz"
  tar "-zxvf", "foo.tgz"
  cd "foo"
  wget "..../foo-patches.tgz"
  tar "zcf", "foo-patches.tgz"
  ls("foo-patches").each do |p|
	patch "-i", "foo-patches/#{p}", "-p1"
  end
  for target in %w/build docs test install/ do
	make target
  end
end

Copyright (c) 2009 Vitaly Kushner vitaly@astrails.com, released under the MIT license