Skip to content

Instantly share code, notes, and snippets.

@AviDuda
Created May 21, 2016 17:47
Show Gist options
  • Save AviDuda/fd90fbe1f6be71ac010e7c51a9d2e5da to your computer and use it in GitHub Desktop.
Save AviDuda/fd90fbe1f6be71ac010e7c51a9d2e5da to your computer and use it in GitHub Desktop.
Upgrade Cygwin packages with a simple alias
#!/bin/bash
echo 'alias upgrade-cygwin="wget https://cygwin.com/setup-x86_64.exe -O ~/setup-x86_64.exe; chmod +x ~/setup-x86_64.exe; ~/setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --upgrade-also --delete-orphans; echo Now close Cygwin."' >> ~/.bashrc
@divinity76
Copy link

add --timestamping - then it will check the last-modified headers (which cygwin.org does provide) and only download setup if your setup actually is out of date, it makes the upgrade much faster if you have an up-to-date setup.exe ^^

fwiw my C:\cygwin64\setup.bat contains

bin\wget.exe --timestamping https://cygwin.com/setup-x86_64.exe && setup-x86_64.exe 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment