Here are the changes, by line number: - remove "-c", keep long version - remove "-f" and "--file". I have never used this, and apt-get does does have it - remove "-m", keep long version - remove "--help", you can get help by just "apt-cyg" - lowercase ARCH variable, typically uppercase is for exported variables - use readonly variables where applicable - remove setup.ini-save, I see no point in this, and setup.exe does not use it - go back to using "[" over "[[", more portable - declare all variables local in "begin" function, this will prevent creation of global variables. Child functions still have access to local variables, but the only fix to that is running every function in a subshell, which is also not ideal - use "let" over "((" - stop using awk ENVIRON array. This became a problem because the array is only populated with exported variables. We do not want variables being passed to child "apt-cyg" processes just to play nice with awk - use "return" in functions instead of "exit", this will allow proper running of "charlie" function - add "check-packages" to some functions - stop creating "desc" files, you can parse this information out of setup.ini easy enough, and setup.exe does not create them either - generate md5 file from setup.ini, this way you can use it with md5sum instead of stdin - utilize "wget -rnH" to create directories - stop running "type -P" when searching for a file with "apt-cyg search". apt-get does not do this and it could be confusing - break "--cache" and "--mirror" out of the case statement and into their own functions. this will make the case statement less unwieldy - write directly to "installed.db" using "awk -i inplace" - function "charlie": this check for any leaked global variables and prints them to stdout just before the script finishes. this should help with debugging |
||
---|---|---|
CHANGELOG.md | ||
README.md | ||
apt-cyg | ||
apt-msys2 |
README.md
apt-cyg
apt-cyg is a Cygwin package manager. It includes a command-line installer for Cygwin which cooperates with Cygwin Setup and uses the same repository.
Command | Description | Analog |
---|---|---|
install | Install packages | apt-get install |
remove | Remove packages | apt-get remove |
update | Update setup.ini | apt-get update |
show | Displays the package records for the named packages | apt-cache show |
list | List packages matching given pattern. If no pattern is given, list all installed packages. | dpkg --list |
search | Search for a filename from installed packages | dpkg --search |
download | Download only - do NOT install or unpack archives | apt-get install --download-only |
depends | Performs recursive dependency listings | apt-cache depends |
listfiles | List files owned by packages | dpkg --listfiles |
Quick start
apt-cyg is a simple script. To install:
lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin
Example use of apt-cyg:
apt-cyg install nano