-
Notifications
You must be signed in to change notification settings - Fork 5
/
aur
executable file
·50 lines (39 loc) · 994 Bytes
/
aur
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# Written By Woland
# Simple script to search the aur using the w3m browser
# Dependency:
# w3m or any other cli browser
# https://github.com/wolandark
# https://github.com/wolandark/BASH_Scripts_For_Everyone
USAGE="Usage: $0 [-h] [-q query]"
usage() {
echo $USAGE
echo " -h display this help message"
echo " -f FEED_URL specify the search query"
}
# printf "Please type your search query\n"
# echo ''
# read query
# lynx https://archlinux.org/packages/?q=$query
while getopts ":hq:" opt;do
case ${opt} in
h )
usage
exit 0
;;
q )
query=$OPTARG
;;
\? )
echo "Invalid option: -$OPTARG" >&2
usage
exit 1
;;
: )
echo "Option -OPTARG requires an argument." >&2
usage
exit 1
;;
esac
done
w3m https://aur.archlinux.org/packages?O=0\&K=$query