Changeset - 231a5478e731
[Not reviewed]
default
0 4 0
Dennis Fink (metalgamer) - 6 years ago 2014-03-22 02:22:56
dennis.fink@c3l.lu
added maintainer search
4 files changed with 40 insertions and 20 deletions:
0 comments (0 inline, 0 general)
README.rst
Show inline comments
...
 
@@ -9,7 +9,7 @@ Yet another AUR helper
 
:Author:         Dennis Fink <the_metalgamer@hackerspace.lu>
 
:Date:           2014-03-19
 
:Copyright:      GPLv3+
 
:Version:        Yaah 0.5.5
 
:Version:        Yaah 0.5.6
 
:Manual section: 8
 
:Manual group:   Yaah Manual
 

	
...
 
@@ -37,6 +37,7 @@ OPTIONS
 
-p, --parseable                         Check installed, foreign packages, if there are updates available and print them in a parseable format.
 
-d DIRECTORY, --downloaddir DIRECTORY   Download packages to the specified directory.
 
-s KEYWORD, --search KEYWORD            Search for packages containing specified keyword.
 
-m MAINTAINER, --maintainer MAINTAINER  Search for packages from specified maintainer.
 
-v, --verbose                           Be more verbose, can be supplied at maximum 2 times.
 
-q, --quiet                             Be less verbose. Takes precedence over -v and --verbose.
 
--version                               Print version information and exit.
...
 
@@ -68,6 +69,9 @@ yaah -c -vv
 
yaah -v task-git
 
    Be more verbose at downloading the package task-git.
 

	
 
yaah -m the_metalgamer
 
    Get list of packages where the maintainer is the_metalgamer.
 

	
 
EXIT CODES
 
==========
 

	
man/man8/yaah.8.gz
Show inline comments
 
binary diff not shown
yaah
Show inline comments
...
 
@@ -3,14 +3,15 @@
 
#:        Title: yaah - Yet another AUR helper
 
#:        Usage: yaah <packages>...
 
#:               yaag [options] [<packages]...
 
#:      Options: -h, --help                             Display help
 
#:               -c, --check                            Check installed, foreign packages if there are updates available
 
#:               -p, --parseable                        Check installed, foreing pacakges if there are updates available and print them in a parsable format
 
#:               -d DIRECTORY, --downloaddir DIRECTORY  Download packages to the specified directory
 
#:               -s KEYWORD, --search KEYWORD           Search for packages containing specified keyword
 
#:               -v, --verbose                          Be more verbose, can be supplied at  maximum 2 times
 
#:               -q, --quiet                            Be less verbose. Takes precedence over -v and --verbose
 
#:               --version                              Prints version and exits
 
#:      Options: -h, --help                              Display help
 
#:               -c, --check                             Check installed, foreign packages if there are updates available
 
#:               -p, --parseable                         Check installed, foreing pacakges if there are updates available and print them in a parsable format
 
#:               -d DIRECTORY, --downloaddir DIRECTORY   Download packages to the specified directory
 
#:               -s KEYWORD, --search KEYWORD            Search for packages containing specified keyword
 
#:               -s MAINTAINER, --maintainer MAINTAINER  Search for packages from specified maintainer
 
#:               -v, --verbose                           Be more verbose, can be supplied at  maximum 2 times
 
#:               -q, --quiet                             Be less verbose. Takes precedence over -v and --verbose
 
#:               --version                               Prints version and exits
 
#: Requirements: jshon <http://kmkeen.com/jshon/>, pacman, tar, curl
 
#:      Version: 0.5.6
 
#:      Created: 2013-02-26
...
 
@@ -174,14 +175,17 @@ error() {
 
#=== FUNCTION =================================================================
 
#        Name: search
 
# Description: Search packages in AUR
 
# Parameter 1: Type of search
 
# Parameter *: Keywords to search for
 
#==============================================================================
 

	
 
search() {
 

	
 
    local type=$1
 
    shift
 
    msg "Searching AUR for $*"
 

	
 
    local url="${AURURL}rpc.php?type=search&arg=$*"
 
    local url="${AURURL}rpc.php?type=$type&arg=$*"
 

	
 
    msg_verbose2 "URL is: ${url}"
 

	
...
 
@@ -461,14 +465,15 @@ usage() {
 
      %s [options] [<packages>]...
 

	
 
    Options:
 
      -h, --help                             Display help
 
      -c, --check                            Check installed, foreign packages if there are updates available
 
      -p, --parseable                        Check installed, foreign packages if there are updates available and print them in a parseable format
 
      -d DIRECTORY, --downloaddir DIRECTORY  Download packages to the specified directory
 
      -s KEYWORDS, --search KEYWORDS         Search for packages containing specified keywords
 
      -v, --verbose                          Be more verbose, can be supplied at  maximum 2 times
 
      -q, --quiet                            Be less verbose. Takes precedence over -v and --verbose
 
      --version                              Print version information and exits
 
      -h, --help                              Display help
 
      -c, --check                             Check installed, foreign packages if there are updates available
 
      -p, --parseable                         Check installed, foreign packages if there are updates available and print them in a parseable format
 
      -d DIRECTORY, --downloaddir DIRECTORY   Download packages to the specified directory
 
      -s KEYWORDS, --search KEYWORDS          Search for packages containing specified keywords
 
      -m MAINTAINER, --maintainer MAINTAINER  Search packages from specified maintainer
 
      -v, --verbose                           Be more verbose, can be supplied at  maximum 2 times
 
      -q, --quiet                             Be less verbose. Takes precedence over -v and --verbose
 
      --version                               Print version information and exits
 

	
 
    For complete documentation, run: man 8 yaah\n" "$SCRIPTNAME" "$VERSION" "$DESCRIPTION" "$SCRIPTNAME" "$SCRIPTNAME"
 
}
...
 
@@ -476,6 +481,7 @@ usage() {
 

	
 
check_flag=
 
search_flag=
 
maintainer_flag=
 
parseable_flag=
 
verbose=0
 
quiet=0
...
 
@@ -523,6 +529,10 @@ while true; do
 
            search_flag=1
 
            shift
 
            ;;
 
        -m|--maintainer)
 
            maintainer_flag=1
 
            shift
 
            ;;
 
        -p|--parseable)
 
            check_flag=1
 
            parseable_flag=1
...
 
@@ -559,7 +569,9 @@ fi
 
if [[ "$check_flag" ]]; then
 
    query_local_version "$@"
 
elif [[ "$search_flag" ]]; then
 
    search "$@"
 
    search "search" "$@"
 
elif [[ "$maintainer_flag" ]]; then
 
    search "msearch" "$@"
 
else
 
    download "$@"
 
fi
yaah.rst
Show inline comments
...
 
@@ -9,7 +9,7 @@ Yet another AUR helper
 
:Author:         Dennis Fink <the_metalgamer@hackerspace.lu>
 
:Date:           2014-03-19
 
:Copyright:      GPLv3+
 
:Version:        Yaah 0.5.5
 
:Version:        Yaah 0.5.6
 
:Manual section: 8
 
:Manual group:   Yaah Manual
 

	
...
 
@@ -37,6 +37,7 @@ OPTIONS
 
-p, --parseable                         Check installed, foreign packages, if there are updates available and print them in a parseable format.
 
-d DIRECTORY, --downloaddir DIRECTORY   Download packages to the specified directory.
 
-s KEYWORD, --search KEYWORD            Search for packages containing specified keyword.
 
-m MAINTAINER, --maintainer MAINTAINER  Search for packages from specified maintainer.
 
-v, --verbose                           Be more verbose, can be supplied at maximum 2 times.
 
-q, --quiet                             Be less verbose. Takes precedence over -v and --verbose.
 
--version                               Print version information and exit.
...
 
@@ -68,6 +69,9 @@ yaah -c -vv
 
yaah -v task-git
 
    Be more verbose at downloading the package task-git.
 

	
 
yaah -m the_metalgamer
 
    Get list of packages where the maintainer is the_metalgamer.
 

	
 
EXIT CODES
 
==========
 

	
0 comments (0 inline, 0 general)