mirror of
https://github.com/s83/aur-helper.git
synced 2024-11-26 05:55:25 +00:00
add the script
This commit is contained in:
parent
eb1084675d
commit
672c479570
23
aur.sh
Normal file
23
aur.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo -n "Enter your desired AUR package: "
|
||||||
|
read pkg
|
||||||
|
|
||||||
|
aurpkgdir=/tmp/aurpkg
|
||||||
|
aurpkg="${pkg}.tar.gz"
|
||||||
|
pwd=$(pwd)
|
||||||
|
|
||||||
|
mkdir -p "$aurpkgdir" && cd "$aurpkgdir"
|
||||||
|
|
||||||
|
curl -o "$aurpkg" "https://aur.archlinux.org/cgit/aur.git/snapshot/${aurpkg}"
|
||||||
|
|
||||||
|
if [ "$?" = "0" ]; then
|
||||||
|
tar xvf "${aurpkg}"
|
||||||
|
cd "${pkg}"
|
||||||
|
makepkg -si
|
||||||
|
cd "$pwd"
|
||||||
|
else
|
||||||
|
echo 'Package not found. Are you sure it is in the AUR?'
|
||||||
|
cd "$pwd"
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user