Run Cygwin Commands in Windows CLI
Run cygwin commands in the Windows CLI or batch scripts like this:
C:\tools\cygwin\bin\bash.exe --login -c "bash cmd"
You can also call a bash script like this:
C:\tools\cygwin\bin\bash.exe --login -c "/home/USERNAME/scripts/my-awesome-script.sh"
Do other cool stuff! For example:
Build a Jekyll project and copy the results to the webroot
C:\tools\cygwin\bin\bash.exe --login -c "cd /home/USERNAME/my-awesome-site/; export PATH="$PATH:/home/USERNAME/bin"; gem install bundler jekyll; bundle exec jekyll build"
robocopy /s /xo /z /r:2 /w:2 /A-:SH C:\tools\cygwin\home\USERNAME\my-awesome-site\_site C:\webroot