Changeset - 8c7e381c5830
[Not reviewed]
default
0 4 0
Dennis Fink - 7 years ago 2013-05-19 18:45:22
the_metalgamer@hackerspace.lu
updated to 0.3.1. Check for dependencies
4 files changed with 26 insertions and 17 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:           2013-03-04
 
:Copyright:      GPLv3+
 
:Version:        Yaah 0.3.0
 
:Version:        Yaah 0.3.1
 
:Manual section: 8
 
:Manual group:   Yaah Manual
 

	
...
 
@@ -29,7 +29,7 @@ Yaah is a helper for the Archlinux User 
 
functions. First of all, it can download packages, from the AUR by their
 
package name. The second function is to check installed foreign packages, if
 
there are updates available. The third function is to search packages in the
 
AUR, which are containing specified keyword.
 
AUR, which are containing a specified keyword.
 

	
 
OPTIONS
 
=======
...
 
@@ -80,6 +80,9 @@ 1
 
2
 
    Error in external program like curl. Maybe the package requested does not exist or you're network connection does not work.
 

	
 
3
 
    Dependencies are not installed. You need to have pacman, curl, tar and jshon installed
 

	
 
SEE ALSO
 
========
 

	
man/man8/yaah.8.gz
Show inline comments
 
binary diff not shown
yaah
Show inline comments
...
 
@@ -20,9 +20,9 @@
 
#:                                                     precedence over -v and
 
#:                                                     --verbose
 
#: Requirements: jshon <http://kmkeen.com/jshon/>
 
#:      Version: 0.3.0
 
#:      Version: 0.3.1
 
#:      Created: 2013-02-26
 
#:     Revision: 2013-03-08
 
#:     Revision: 2013-05-19
 
#:       Author: Dennis Fink <the_metalgamer@hackerspace.lu>
 

	
 
## Security
...
 
@@ -43,7 +43,7 @@ umask $UMASK
 
SCRIPTNAME=${0##*/}
 
DESCRIPTION="Yet another AUR helper"
 
DATE_OF_CREATION=2013-02-26
 
VERSION=0.3.0
 
VERSION=0.3.1
 
AUTHOR="Dennis Fink <the_metalgamer@hackerspace.lu>"
 

	
 
readonly SCRIPTNAME DESCRIPTION DATE_OF_CREATION VERSION AUTHOR
...
 
@@ -176,9 +176,9 @@ search() {
 
        local package=$(jshon -Q -e results -e $i <<< "$aur_response")
 

	
 
        local package_name=$(jshon -Q -e Name <<< "$package")
 
        local package_version=$(jshon -Q -e Version <<< $package)
 
        local package_description=$(jshon -Q -e Description <<< $package)
 
        local out_of_date=$(jshon -Q -e OutOfDate <<< $package)
 
        local package_version=$(jshon -Q -e Version <<< "$package")
 
        local package_description=$(jshon -Q -e Description <<< "$package")
 
        local out_of_date=$(jshon -Q -e OutOfDate <<< "$package")
 

	
 
        # removing quotes
 
        package_name=${package_name//\"}
...
 
@@ -312,15 +312,11 @@ query_local_version () {
 
    if [[ $? -eq 0 ]]; then
 
        msg "There are ${#packages[@]} foreign packages to check."
 

	
 
        msg_verbose2 "Sorting package array!"
 

	
 
        sorted_packages=($(sort <<<"${packages[*]}"))
 

	
 
        msg_verbose2 "Creating associative array!"
 

	
 
        declare -A associative_packages
 

	
 
        for package in "${sorted_packages[@]}"; do
 
        for package in "${packages[@]}"; do
 
            local package_name=${package%\ *}
 
            local package_version=${package#*\ }
 
            associative_packages[$package_name]=$package_version
...
 
@@ -347,13 +343,13 @@ extract_and_remove () {
 

	
 
            msg "Extracting '$1'"
 

	
 
            tar xzf $1 -C $downloaddir
 
            tar xzf "$1" -C "$downloaddir"
 

	
 
            msg_verbose2 "Setting trap to remove archive and extracted directory"
 
            trap "rm -rf $1 $downloaddir/${1%.tar.gz}" EXIT
 

	
 
            msg_verbose1 "Removing '$1'"
 
            rm $1
 
            rm "$1"
 
        else
 
            error "'$1' is not a file"
 
            return 2
...
 
@@ -437,6 +433,13 @@ if [[ $# -eq 0 ]]; then
 
    exit 1
 
fi
 

	
 
# Check for dependencies
 
hash curl 2>/dev/null || { error "curl is not installed!"; exit 3; }
 
hash tar 2>/dev/null || { error "tar is not installed!"; exit 3; }
 
hash pacman 2>/dev/null || { error "pacman is not installed!"; exit 3; }
 
hash jshon 2>/dev/null || { error "jshon is not installed"; exit 3; }
 

	
 

	
 
while true; do
 
    case $1 in
 
        -h|--help|-\?)
yaah.rst
Show inline comments
...
 
@@ -9,7 +9,7 @@ Yet another AUR helper
 
:Author:         Dennis Fink <the_metalgamer@hackerspace.lu>
 
:Date:           2013-03-04
 
:Copyright:      GPLv3+
 
:Version:        Yaah 0.3.0
 
:Version:        Yaah 0.3.1
 
:Manual section: 8
 
:Manual group:   Yaah Manual
 

	
...
 
@@ -29,7 +29,7 @@ Yaah is a helper for the Archlinux User 
 
functions. First of all, it can download packages, from the AUR by their
 
package name. The second function is to check installed foreign packages, if
 
there are updates available. The third function is to search packages in the
 
AUR, which are containing specified keyword.
 
AUR, which are containing a specified keyword.
 

	
 
OPTIONS
 
=======
...
 
@@ -80,6 +80,9 @@ 1
 
2
 
    Error in external program like curl. Maybe the package requested does not exist or you're network connection does not work.
 

	
 
3
 
    Dependencies are not installed. You need to have pacman, curl, tar and jshon installed
 

	
 
SEE ALSO
 
========
 

	
0 comments (0 inline, 0 general)