Hack an apt-get style installer into Cygwin

As you’ll probably know, you can install a bunch of plugins into Cygwin, but only during installation. Do the following to make life easier for yourself.

After installation, copy the setup executable into the cygwin folder.

Create install-pkg.bat with the following contents:

setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --root "%cd%" --packages %*

Now you can cd into /cygdrive/c/cygwin64 and install a package like so:

$ ./install-pkg.bat wget