File diff a7f2a8344d3c → 48dc373f9a02
yaah
Show inline comments
 
#!/bin/bash -
 

	
 
#:        Title: yaah - Yet another AUR helper
 
#:     Synopsis:
 
#:      Options:
 
#:     Synopsis: yaah [options] [packages]
 
#:               yaah (packages)
 
#:      Options: -h, --help                            Display help
 
#:               -c, --check                           Check installed, foreign
 
#:                                                     packages if there are
 
#:                                                     updates available
 
#:               -d directory, --downloaddir=directory Download packages to the
 
#:                                                     specified directory
 
#:               -v, --verbose                         Be more verbose, can be
 
#:                                                     supplied at  maximum 2
 
#:                                                     times
 
#:               -q, --quiet                           Be less verbose. Takes
 
#:                                                     precedence over -v and
 
#:                                                     --verbose
 
#: Requirements: jshon <http://kmkeen.com/jshon/>
 
#:      Version: 0.1-alpha
 
#:      Created: 2013-02-26
 
#:     Revision: 2013-02-26
 
#:     Revision: 2013-03-04
 
#:       Author: Dennis Fink <the_metalgamer@hackerspace.lu>
 

	
 
## Security
...
 
@@ -223,7 +235,7 @@ query_local_version () {
 
    done < <(pacman -Qm $@)
 
    if [[ $? -eq 0 ]]; then
 
        msg "There are ${#packages[@]} foreign packages to check."
 
        
 

 
        if [[ $verbose -ge 2 ]]; then
 
            msg "Sorting package array!"
 
        fi
...
 
@@ -250,7 +262,7 @@ extract_and_remove () {
 
            msg "Extracting '$1'"
 

	
 
            tar xzf $1 -C $downloaddir
 
            
 

 
            if [[ $verbose -ge 1 ]]; then
 
                msg "Removing '$1'"
 
            fi
...
 
@@ -306,9 +318,20 @@ download () {
 

	
 
usage() {
 
    printf "$SCRIPTNAME - $DESCRIPTION
 
    -h, --help Display help
 
    -c, --check Check installed packages if there are updates
 
    -d, --downloaddir <directory> Download packages to the specified directory\n"
 

	
 
    Download packages from AUR or check installed, foreign packages, if there are updates available.
 

	
 
    Usage: $SCRIPTNAME [options] [packages]
 
           $SCRIPTNAME (packages)
 

	
 
    Options:
 
    -h, --help                              Display help
 
    -c, --check                             Check installed packages if there are updates
 
    -d directory, --downloaddir=directory   Download packages to the specified directory
 
    -v, --verbose                           Be more verbose, can be supplied at maximum 2 times
 
    -q, --quiet                             Be less verbose. Takes precedence over -v and --verbose
 

	
 
    For complete documentation, run: man 8 yaah\n"
 
}