Upgrade GNU Parallel Using Macports
You are all using GNU Parallel, right? It's an awesome replacement for xargs, bash loops, all sorts of low-level unix command line stuff. Parallel provides a clean way to execute many jobs in parallel on the command line to take advantage of our modern multicore cpus inside command pipelines.
One thing I particularly love about parallel is it provides a much cleaner and simpler quoting facility than
find -exec or
You can install parallel on a mac via Macports, but that is currently at version 20100922. There's been a lot of development in parallel in the last few months so you probably want to get the latest version.
Sidebar: yes I know that homebrew is supposed to be better than macports, but I haven't tried it yet.
Anyway, @kogent just posted an updated portfile for gnu parallel. You can use this to build and install the latest parallel (20110422) on your mac. Here's what I just did, following this local macports repo guide.
- download the new portfile.
- look in that file, see that it's category
- create my local port directory tree with
mkdir -p ~/ports/sysutils/parallel
- copy the Portfile to
- build the port index via
cd ~/ports && portindex
tell the system to look at my private portdir
- add the line
file:///Users/philiph/ports(before the existing url line)
That's it. Now if you run
port search parallel you should see the 04222011 version listed before the old version. Run
port install parallel and the new version will be installed.