Commit Graph

119 Commits

Author SHA1 Message Date
Steven Penny aa4a288c33 modified: README.md 2014-12-16 01:14:10 -06:00
Steven Penny 91c7746b9b modified: README.md 2014-12-16 01:06:31 -06:00
Steven Penny b6cbda6fa5 rdepends: find-like output
e9bea37b95
2014-12-16 00:34:42 -06:00
Steven Penny 3f2b9d9ce6 modified: README.md 2014-11-17 14:27:37 -06:00
Steven Penny b6f9d536db minor edit 2014-11-14 19:23:18 -06:00
Steven Penny 23c2db7a28 searchall: fix split lines
http://cygwin.com/ml/cygwin/2014-11/msg00287.html
2014-11-12 18:53:12 -06:00
Steven Penny 9b5de3f26c searchall: account for broken lines
http://cygwin.com/ml/cygwin/2014-11/msg00278.html
2014-11-12 15:18:43 -06:00
Steven Penny e9bea37b95 depends: find-like output
when dealing with package dependency woes, such as

http://cygwin.com/ml/cygwin/2014-10/msg00563.html

The current "depends" tree method fails, because it only shows the packages, not
the dependency paths. These paths are necessary to solve the "shortest path
problem"

http://wikipedia.org/wiki/Shortest_path_problem

Now, every possible dependency path will print from the chosen package. Combined
with category search you can run searches such as

    apt-cyg category Base |
    apt-cyg depends |
    awk '/perl$/ {print length,$0}' |
    sort -n

Solving the path problem in seconds.
2014-11-11 03:15:24 -06:00
Steven Penny 2138f54544 check-packages 2014-11-01 00:30:30 -05:00
Steven Penny 8eb315174e Support standard input
Can now pipe package names to apt-cyg, example

    echo bash | apt-cyg show

If --file is provided as well, it will override stdin

    echo bash | apt-cyg show --file foo.txt

Note the Linux analog "apt-cache show" does not provide this functionality.
2014-10-31 11:38:13 -05:00
Steven Penny 83cac7847e category command
This is similar to the command

    aptitude search '?section(shells)'

http://askubuntu.com/a/473511
2014-10-31 00:06:52 -05:00
Steven Penny 7bee9222bc Never print "No packages found" with apt-cyg list 2014-10-26 20:30:30 -05:00
Steven Penny c7f61ef0e8 Update README.md 2014-10-26 18:40:21 -05:00
Steven Penny 7bec32e1d8 Consistent function declarations 2014-08-04 11:14:43 -05:00
Steven Penny e83c360a05 Merge pull request #20 from kuc/improve-readme
Improve README.md
2014-07-26 06:14:12 -05:00
Miłosz Sieradzki 3ad0cc5dc8 Improve README 2014-07-26 13:05:32 +02:00
Steven Penny 73702ab805 Fix #18 2014-06-28 02:20:26 -05:00
Steven Penny 8c91a53a7e Write to and read from setup.rc
"last-cache" and "last-mirror" will now be written to and read from setup.rc,
instead of the non-standard /etc/setup/last-{cache,mirror}.
2014-06-18 01:34:05 -05:00
Steven Penny 12f39475ab Minor fix 2014-06-16 00:56:06 -05:00
Steven Penny b1ad202938 Refactor download fucntion
Some packages were being downloaded to wrong location. For example "gcc-core" is
supposed to be found at

    release/gcc/gcc-core

However it was being downloaded at

    release/gcc-core

Packages will now be downloaded as directed by "setup.ini"
2014-06-16 00:31:43 -05:00
Steven Penny 72fe905e4e download command
This is similar to the "apt-get --download-only install" command.
2014-06-15 18:53:29 -05:00
Steven Penny 8882af76ca Revise usage 2014-06-15 16:17:50 -05:00
Steven Penny 4af30ccb88 Stop using google search
I discovered today that not all packages have been indexed by Google. For
example the 64-bit "gcc-core" which provides "gcc.exe"

http://cygwin.com/packages/x86_64/gcc-core

This search

http://google.com/search?q=%22installed+binaries%22+%22usr%2Fbin%2Fgcc.exe%22+x86_64

currently only yields the "gcc-debuginfo" package.
2014-06-15 14:17:03 -05:00
Steven Penny 59c523600f Simplify proxy check 2014-06-14 19:44:49 -05:00
Steven Penny 67658a514a Improve JSON parser 2014-06-14 19:07:57 -05:00
Steven Penny a58f4b69ef JSON function 2014-06-14 16:46:18 -05:00
Steven Penny ed6092a005 New proxy logic
1. create proxy file if not exist
2. create array from proxy file if not exist
3. if array is empty download proxy file
4. shift continue unless country is US
5. shift continue if proxy is slow
6. shift continue if proxy is blocked by Google
7. print successful proxy
8. save remaining proxies to file
2014-06-14 13:28:46 -05:00
Steven Penny 062883c89f --version: fix license 2014-06-12 17:12:10 -05:00
Steven Penny 143e7a816f Change proxy list 2014-06-11 22:04:43 -05:00
Steven Penny 71a3ce0cff Prep for new proxy 2014-06-11 22:01:13 -05:00
Steven Penny 62cc43296c Update README 2014-06-11 07:32:30 -05:00
Steven Penny b11ab2daa5 searchall: filter out "Index of"
"Index of" pages do not contain list of files, only list of packages.
2014-06-09 07:13:53 -05:00
Steven Penny 29cd84482b Stop using cygwin.com for searchall
After reading this message
http://cygwin.com/ml/cygwin/2014-05/msg00482.html

I set out to find a better option. I found a solution here
http://stackoverflow.com/a/10554535

Granted this is a deprecated API, if it actually dies it will be easy enough to
replace with a scraper.
2014-06-09 05:32:02 -05:00
Steven Penny 81c64c992d Golf the ARCH code 2014-06-05 00:36:44 -05:00
Steven Penny e5abc1cc79 Use proper array for packages
I think package names are not allowed to contain spaces anyway, but if they are
it would cause apt-cyg to fail spectacularly. Some unquoted

    $pkg

are still lingering but that is an easy fix.
2014-06-04 21:25:14 -05:00
Steven Penny e989ec917e Minor edit 2014-06-03 23:55:32 -05:00
Steven Penny 6fc1dacd30 Support /dev/clipboard 2014-06-03 23:51:18 -05:00
Steven Penny a6d4d8f709 Minor edit "usage" 2014-06-01 18:35:21 -05:00
Steven Penny 1272ac41bc Use sed to print blocks of text
The array method works fine, but sed method uses less characters and is easier
to read. Also it does support indenting, it would just need to be modified to

    sed '1d;$d;s/  //'

or similar.
2014-06-01 18:30:11 -05:00
Steven Penny 200ce9069d Search "devel" packages unless looking for ".exe"
apt-cyg searchall will now only exclude "devel" packages if you are searching
for ".exe" or similar.
2014-05-31 11:25:12 -05:00
Steven Penny c8fb2604da Improve "depends" function
- function will now print the packages at proper depths
- added newline between each result if called with multiple packages
2014-05-28 23:26:51 -05:00
Steven Penny 390024541d listfiles download if necessary
listfiles was only working on packages that were already installed. You should
be able to list a packages files even if it is not installed, especially if it
has already been downloaded.

The function will now download the package if necessary, without installing, in
order to view the package files.

Other small changes

- conditional echo instead of piping to "head" in certain loops
- download function was exiting upon failure, when really it should just skip to
  next package
- simplified a grep statement
2014-05-27 23:18:48 -05:00
Steven Penny 13a9f583b4 Download function
Package download functionality has been moved into its own private function, to
support future updates.
2014-05-26 00:04:00 -05:00
Steven Penny 6ec55ffc18 msys2 create wrapper scripts
The MSYS2 programs will not play nice with Cygwin paths. This change will create
a wrapper script in "/usr/local/bin" for each ".exe" that runs the exe with a
path it will recognize.
2014-05-25 14:36:38 -05:00
Steven Penny 530e70c1f7 msys2 correct awk statement
Files are not always at field 15, they are always last field though.
2014-05-25 13:17:39 -05:00
Steven Penny 1ff704ed38 msys2 listfiles command
This is similar to the "dpkg --listfiles" command.
2014-05-25 13:09:59 -05:00
Steven Penny feffce1578 change mode apt-msys2 2014-05-25 06:10:21 -05:00
Steven Penny d5a8c42eb1 apt-msys2
This is a file similar to apt-cyg. It will install packages from the MSYS2
project. It will only be practical for packages from the "MINGW" repo, as
packages from the "MSYS2" repo would require the MSYS2 dll.

I have a need for this because Cygwin Tcl/Tk requires X11. MSYS2 Tcl/Tk does not
require X11, so it can run much faster.
2014-05-25 06:02:57 -05:00
Steven Penny 461d5955e9 Remove redundant license
The license is already in the header of the file.
2014-05-25 04:09:23 -05:00
Steven Penny fbf531e638 Remove case statement
by using functions instead of case statement

- remove level of indentation
- allow use of local variables via "local" keyword
2014-05-24 20:35:41 -05:00