From 0496e2c8877e892ad8b40c86c959667199d26623 Mon Sep 17 00:00:00 2001 From: fbt Date: Sun, 9 Aug 2015 15:55:10 +0300 Subject: [PATCH] there is one AUR now --- prm | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/prm b/prm index 3ccca35..0dd586b 100755 --- a/prm +++ b/prm @@ -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 + read -r pkg_base < <( jshon -e results -e PackageBase -u <<< "$pkg_aur_info" ) + tarball_path="/cgit/aur.git/snapshot/${pkg_base}.tar.gz" (( 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" ]] || {