Changeset - 1a0dcd68725c
[Not reviewed]
default
0 1 0
Dennis Fink (metalgamer) - 5 years ago 2015-08-20 00:30:24
dennis.fink@c3l.lu
Use jshon do remove quotes instead of bash as this can be done in one step
1 file changed with 5 insertions and 12 deletions:
yaah
5
12
0 comments (0 inline, 0 general)
yaah
Show inline comments
...
 
@@ -197,20 +197,13 @@ search() {
 

	
 
        local package=$(jshon -e "$i" <<< "$aur_response")
 

	
 
        local package_name=$(jshon -e Name <<< "$package")
 
        local package_version=$(jshon -e Version <<< "$package")
 
        local package_description=$(fold -sw "$COLS" <<< "$(jshon -e Description <<< "$package")")
 
        local package_name=$(jshon -e Name -u <<< "$package")
 
        local package_version=$(jshon -e Version -u <<< "$package")
 
        local package_description=$(fold -sw "$COLS" <<< "$(jshon -e Description -u <<< "$package")")
 
        local out_of_date=$(jshon -e OutOfDate <<< "$package")
 
        local num_votes=$(jshon -e NumVotes <<< "$package")
 
        local maintainer=$(jshon -e Maintainer <<< "$package")
 
        local last_modified=$(jshon -e LastModified <<< "$package")
 

	
 
        # removing quotes
 
        package_name=${package_name//\"}
 
        package_version=${package_version//\"}
 
        package_description=${package_description//\"}
 
        maintainer=${maintainer//\"}
 
        last_modified=$(date -d @"$last_modified")
 
        local maintainer=$(jshon -e Maintainer -u <<< "$package")
 
        local last_modified=$(date -d @$(jshon -e LastModified <<< "$package"))
 

	
 
        if [[ $out_of_date -eq 0 ]]; then
 
            local color="${GREEN}"
0 comments (0 inline, 0 general)