To search and download a package missed from Cygwin I need to run setup.exe GUI each time, click many times and do other boring things.
Is there a way to do the same from Cygwin's command line directly? Like apt-get tools do.
Take a look here:
Aside from the other things, it gives the following list of options to
To search for a package, per:
you can use
which produces output like (example from above site):
This performs an unattended upgrade of all cygwin components
You should reboot after the upgrade is completed to prevent cygwin apps from misbehaving due to upgraded cygwin1.dll
--no-desktop Disable creation of desktop shortcut
--no-shortcuts Disable creation of desktop and start menu
--no-startmenu Disable creation of start menu shortcut
--quiet-mode Unattended setup mode
The location for Cygwin's setup seems to have changes and split. Now you need either
The installer allows it from command line (elevated shell, please):
for 64 bits version:
Works via GUI (DOS shell) or even on remote console (SSH or telnet). Not tested on PowerShell (someone did?).
Example of correct updating output:
If, during update, you had issues like these:
...then you must rebase after installation:
1.- Close all CygWin shell, programs and services.
I felt this need too a while ago. I used to just keep the installer file downloaded so I could just run it to install, but occasionally as Cygwin would be updated, the installer file would become out of date. I ended up creating a Powershell script that auto-elevates, downloads the installer, and runs an unattended upgrade. I have it sit on my desktop and can just right-click and "Run with Powershell" and it will perform an in-place upgrade of all my Cygwin packages. The only user interaction needed is for UAC and a "Press any key to continue" prompt at the very end. It can be run from the command-line as well, though, as it is just a script.
I have had the code up here for a while: http://pastebin.com/wMRctAuL
I copied it below. I wrote it with the help of a few StackOverflow Q&As as well. :) All you have to do to be able to run it is to enable local Powershell scripts on your machine. It's a complete, Windows-native solution.
Expanding on @Johnny's answer http://superuser.com/a/624731/110335
The annoyance I faced were occasion prompts that the .ini file is from a newer version of Cygwin's setup.exe
I wrote myself the following script to self-update, and then update all that needs to, noninteractively.