there is one AUR now

This commit is contained in:
Jack L. Frost 2015-08-09 15:55:10 +03:00
parent a450ff9708
commit 0496e2c887

25
prm
View File

@ -6,9 +6,7 @@
_self="${0##*/}"
cfg_workdir="$PWD"
# Version 4 by default.
cfg_aur_version='4'
cfg_aur_url="https://aur.archlinux.org"
err() { printf "$@" >&2; }
@ -68,17 +66,8 @@ aur.get() {
read -r pkg_aur_info
# A temporary hack till AUR4 becomes the main version
if (( cfg_aur_version == 4 )); then
read -r pkg_base < <( jshon -e results -e PackageBase -u <<< "$pkg_aur_info" )
tarball_path="/cgit/aur.git/snapshot/${pkg_base}.tar.gz"
else
{
read -r pkg_base
read -r tarball_path
} < <(
jshon -e results -e PackageBase -u -p -e URLPath -u <<< "$pkg_aur_info"
)
fi
(( flag_force )) || {
[[ -d "${cfg_workdir}/${pkg_base}" ]] && {
@ -195,10 +184,6 @@ main() {
action='search'
flag_search_syncdb=1;;
(-V)
cfg_aur_version="$2"
shift;;
(-u)
cfg_aur_url="$2"
shift;;
@ -232,14 +217,6 @@ main() {
unset flag_search_aur flag_search_syncdb
}
if [[ -z "$cfg_aur_url" ]]; then
if (( cfg_aur_version == 3 )); then
cfg_aur_url="https://aur.archlinux.org"
else
cfg_aur_url="https://aur4.archlinux.org"
fi
fi
cfg_aur_api="${cfg_aur_url}/rpc.php"
[[ "$action" ]] || {