Arduino from the command line

How to compile Arduino code from the command line.

Martin Oldfield, 10 Jun 2010