Friday, April 11, 2014

Installing SLOCCount in Cygwin

wget http://www.dwheeler.com/sloccount/sloccount-2.26.tar.gz
tar xzvf sloccount-2.26.tar.gz
cd sloccount-2.26/
EXE_SUFFIX=.exe
make EXE_SUFFIX=.exe
make install

Done!

Installing the ack commandline search utility in Windows via Cygwin.

I know that this is a bit outside the scope of this blog, but it's still a step away from a win32 or nt environment towards a posix environment. I had occasion to need the tool ack, which is an amazing text search utility that provided fantastic source code searching at super efficient runtimes, in a windows environment. The obvious solution here is to install it in the posix layer, cygwin, instead of in windows directly.

So... here we go!

First, grab yourself a copy of cygwin : http://www.cygwin.com/

Install the base installation, and also go ahead and install the development and perl categories . You could probably get away with only installing a small subsection of those, but I'm lazy and so are you, so install away.

Next, open a cygwin terminal and run this:

perl -MCPAN -e "CPAN::Shell->force(qw(install App::Ack));"

When asked if you want to install as locallib or sudo, just type manual, cygwin will let you install the package properly!

Enjoy!!!