The variable to use would be process.platform
On Mac the variable is set to darwin
. On Windows, it is set to win32
(even on 64 bit).
aix
darwin
freebsd
linux
openbsd
sunos
win32
android
(Experimental, according to the link)
I just set this at the top of my jakeFile:
var isWin = process.platform === "win32";