General Musing

blaze your trail

Proof of Concept: Use Everywhere #bash

leave a comment »

For a while I’ve been using custom tools to perform certain task that I wasn’t able to do with the shell tools provided. Or which worked differently on each of the Unix platforms I worked on. I mostly solved this by adding any custom scripts to the bundle that I deployed. This naturally didn’t work for compiled programs, due to different processors and kernel stacks.

When I came to a platform for which I had not yet compiled my custom tool I would compile it and add it to my custom share, USB-stick or CVS. I would name the tool <name>-<machine>-<system> which would allow me to ship the bundle with a version which was compiled specifically for that platform, or for multiple platforms. I would then call my wrapper script which would call the specific binary for the current platform.

I […] am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand. Ten seconds, I tell myself, is ten seconds. Time is valuable and ten seconds’ worth of it is well worth the investment of a day’s happy activity working out a way of saving it.
Douglas Adams

Naturally I borrowed the idea from somebody, although I can no longer remember who.

Image source: pastebin


Written by Daniël W. Crompton (webhat)

March 10, 2012 at 12:48 pm

Posted in hardware, OS, programming

Tagged with , ,

Please Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

%d bloggers like this: