apt-cyg provides a command-line package manager that you can use to install tools without using the GUI installer. However, I didn't see a way to update the existing tools. You can write a simple batch script to do the automatic updates for you. You only need the three lines below, assuming you've installed cygwin to
C:\cygwin
. Then, run the batch file as administrator or create a shortcut to do that for you.cd C:\cygwin wget -N http://cygwin.com/setup.exe setup.exe --no-desktop --no-shortcuts --no-startmenu --quiet-modeIf you want to pretty it up so you can scan the results of the commands easier, just add some echo statements:
@ECHO off cd C:\cygwin echo ====================================== echo Downloading latest cygwin installer... echo ====================================== echo. wget -N http://cygwin.com/setup.exe echo. echo ====================================== echo Updating all cygwin packages... echo ====================================== echo. setup.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode echo. echo ====================================== echo Update finished. echo ====================================== echo. pause
You probably found this out long ago, but in case anyone else finds this from a web search - you *can* upgrade from a cygwin terminal:-
ReplyDelete$ apt-get update
$ for i in `apt-get show`; do apt-get install $i; done
egremont2002, could you clarify this? As far as I know there is not an apt-get tool for cygwin.
DeleteIt looks like a typo : use `apt-cyg` instead of `apt-get` and it works just fine indeed, though maybe a bit slower since it seems to restart the setup each time.
DeleteUpdate : to run the setup only once you could try the following command. Though it might not work with too many packages installed, there's a limit to the number of arguments on a command line, so it would be an issue with xargs.
Delete$ apt-cyg show | xargs apt-cyg install
@Michael that won't actually work - apt-cyg will skip any already installed packages. The only reliable way to upgrade a package is through the setup installer, or through a custom script.
Delete