Go to file
Steven Penny cc9b2bdf0d functions: download set-cache set-mirror apt-install apt-remove begin charlie
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
2014-12-29 16:36:17 -06:00
CHANGELOG.md Update README 2014-06-11 07:32:30 -05:00
README.md modified: README.md 2014-12-20 03:03:25 -06:00
apt-cyg functions: download set-cache set-mirror apt-install apt-remove begin charlie 2014-12-29 16:36:17 -06:00
apt-msys2 searchall: account for broken lines 2014-11-12 15:18:43 -06:00

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