I\'d like to run a long rsync command in Cygwin by double clicking on a .sh file in Windows. It must start in the file\'s containing directory (e.g. /cygdrive/c/scripts/) so th
I use PuttyCyg (awesome putty in Cygwin window) here's how to get it all going:
Create a batch script, eg. on my machine I used
C:\Dev\scripts\cygbashrun.bat
with contents
SET CYGWIN=nodosfilewarning
C:\Cygwin\bin\putty.exe -cygterm /bin/bash.exe %1
Obviously adapt to contain the paths of your install of PuttyCyg.
Then in Windows File Explorer go to Tools - Folder Options - File Types
Create a ".sh" entry if there isn't already (or .bash depending on what you like your scripts to have).. then Advanced..
[optional step] change the icon and select the Cygwin icon from your install
Then:
Works like a charm for me :O)