blob: c95c11332328e9734211aede07eb17d20a78bc61 (
plain)
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
|
#!/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/')"
exit
fi;
cd prog/aur
echo Pulling...
wget "https://aur.archlinux.org/packages/`echo $1|cut -b 1-2`/$1/$1.tar.gz"
if [ -f "$1.tar.gz" ]; then
echo Extracting...
tar -xf "$1.tar.gz"
cd "$1"
mv ../"$1.tar.gz" .
echo -n Edit\?\
read edit
[ "$edit" = "y" ] && $EDITOR PKGBUILD
echo Building...
makepkg -f
if [ "$?" = "0" ]; then
name=$1"-`sed -n 's/pkgver=//p' PKGBUILD`-`sed -n 's/pkgrel=//p' PKGBUILD`"
echo Installing...
sudo pacman -U $name*.xz
fi;
fi;
|