A super-simple install


I was reading this Perl Advent Calendar (that would be good for DragonFly, come to think of it) post about ack, and came across a interesting line:

curl http://betterthangrep.com/ack-standalone > ~/bin/ack && chmod 0755 !#:3'

fetch’ would work just as well on a BSD system. The interesting thing is that it’s a one-liner for installing software that doesn’t make any assumptions about having an existing framework like pkgsrc or aptitude or anything like that – it just grabs the code and plops it in place.  It wouldn’t work for more complex software, but the simplicity is intriguing, to match the Unix-like single, chainable program idea.

For those who haven’t seen it, ‘ack‘ is a grep replacement that automatically takes care of common activities around searching – skipping files that would cause duplicate matches, binary files, etc., handles a larger range of regular expressions, and runs startlingly fast.

3 Comments on A super-simple install

Respond | Trackback

  1. It has been pretty famous in the Perl community recently. For more complex stuff you can use a shell script:
    # perlbrew allows you to install a custom version of Perl (as root or user)
    curl -L http://xrl.us/perlbrewinstall | bash

    An other nice example is cpanminus:
    # A small version of the cpan command
    # Without –sudo it allows you to install
    # perl modules inside your home directory
    curl -L http://cpanmin.us | perl – –sudo App::cpanminus

    This stuff could be interesting for minor updates I guess. A script that handles download, checksum/signature verification and installation or maybe even find the right patches would be nice. But something like that would most likely shipped as a tool within the system I guess.

  2. Weaver says:

    Pair it with wget and you could have something.

  3. Andy Lester says:

    Justin, one of the goals with ack was to make sure that it did NOT use any crazy modules and dependencies, because it can be a pain on a new box to do that. I made it so that you could just drop it in your ~/bin directory under Subversion, which is what I do, and then carry your ~/bin to other directories.

    It’s meant so that no matter where you are, if you have a web connection, you can get ack. You can even go to the ack-standalone page, highlight the text, paste it into a buffer, and save it that way. No one should ever have to be without their tools, right?

    The single-standalone version is meant to be subversive. :-)

Respond

Comments

Comments