summaryrefslogtreecommitdiff
path: root/aur
diff options
context:
space:
mode:
authorTslil Clingman <hiato1@gmail.com>2014-06-20 19:15:46 +0200
committerTslil Clingman <hiato1@gmail.com>2014-06-20 19:15:46 +0200
commitefd9525d83d25ae2cd3c308e4a6ca25fc8f5aeb1 (patch)
tree150253de60b71dab99b657a453ed6e09d383c35b /aur
parent23de8238428186ad7a4c50ea40f8763c7a4a1298 (diff)
Fixed aur script to work with new format
Diffstat (limited to 'aur')
-rwxr-xr-xaur7
1 files changed, 4 insertions, 3 deletions
diff --git a/aur b/aur
index dfe68c1..30df19a 100755
--- a/aur
+++ b/aur
@@ -1,9 +1,10 @@
# Simple AUR wrapper
#!/bin/sh
if [ "$1" = "-s" ]; then
- echo Searching for "$2" ...
- echo
- echo -e "$(wget -q "https://aur.archlinux.org/rpc.php?type=search&arg=$2" -O - | tr '{:' '\n ' | grep Name | sed 's/.*,"Name"\ "\(.*\)","Version"\ "\([0-9.-]*\).*,"Description"\ "\(.*\)","URL".*/\1 \2\n \3\n/')"
+ shift
+ echo Searching for "$*" ...
+ var="$(echo $* | sed 's/\ /%20/g')"
+ echo -e "$(wget -q "https://aur.archlinux.org/rpc.php?type=search&arg=$var" -O - | tr '{' '\n ' | grep Name | sed 's/.*"Name":"\(.*\)",.*,"Version":"\(.*\)",.*,"Description":"\(.*\)","URL".*/\1 \2\n \3\n/')"
exit
fi;