Ruby Sheller Screencast

Some years ago, when I was starting in the world of Linux and OpenSource I started a project called Sourcer. I still like the idea but the implementation sucks, so I have always wanted to revive that project, unfortunately I have never found time for that.

However, I think I have done the first steps with this Ruby Sheller thing.

Basically it’s a glorified system command. There’s a huge problem with the system command, you can’t do something like:

system("cd /tmp")
system("ls")

So that’s what Sheller does, and more things:

* Prettify output
* Generate batch files from XML

Of course everything in an extensible way, so if you just include the base class you’ll have the most useful functionality: just execute things.

Now, the Sheller concept can be used for any scripting language, so should be able to not only execute shell scripts inside Ruby, but also Python, Perl, you name it.

I have created a screencast that shows how to use it:

If it doesn’t look that good you can get it here.

In the end you can do things like:

sh = Sheller.new
sh.do("pushd $mydir")
sh.do("make")
sh.do("make install")
sh.do("popd")

The base code can be found here.

Comments?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s