Cygwin automatic updates
Cygwin is a fantastic product for people that need to use Microsoft Windows and require some compatibility to Linux (or BSD or UNIX in general).
Unfortunately it is not trivial to keep it updated (and thus safe) as the update process requires downloading the latest installer and then clicking through the package list again and again on every update.
apt-get update, no
emerge --update @world, no
But ... the people at Red Hat (who now own Cygwin) are not mean, they are just not good at documenting things ...
Be sure to have wget installed via cygwin, you'll need it to fetch the installer automatically.
Then drop the following batch file as
C:\cygwin64 (or where you have installed cygwin1):
- @echo off
- cd /d C:\cygwin64
- del /Q cygwinSetup-x86_64.exe
- bin\wget.exe --progress=dot -S -N http://cygwin.com/setup-x86_64.exe
- move /y setup-x86_64.exe cygwinSetup-x86_64.exe
- REM S-1-1-0 is the SID for "Everyone"
- icacls cygwinSetup-x86_64.exe /grant *S-1-1-0:RX
- cygwinSetup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode
Once you start the batch (e.g. by double-clicking from Windows Explorer) it will download the latest installer from Cygwin.com and perform a silent update.
You need to approve the Windows installer warning as you do with every manual install / update as well. So it's not a no-click update but a one-or-two-clicks update.
Still much better than the click fest without the batch file.
01.06.2017: I've changed icacls cygwinSetup-x86_64.exe /grant Everyone:RX to icacls cygwinSetup-x86_64.exe /grant *S-1-1-0:RX which is the SID and not language dependent. 'cause otherwise German Windows would like to see "Jeder" and French "Tous publics", Chinese "任何人", etc. Looking them up on Microsoft's terminology search is quite nice but not really scalable.
If you have installed the 32bit version and/or used a different install path, adjust line 2 of the batch file accordingly. Did I need to say that? Hm, well, I did ... have a cookie. ↩