5 Commits
v3.0 ... v3.2.2

Author SHA1 Message Date
fbt
0496e2c887 there is one AUR now 2015-08-09 15:55:10 +03:00
fbt
a450ff9708 use aur4 by default 2015-06-22 13:31:03 +03:00
fbt
dd0d7f7902 support AUR 4 2015-06-10 14:15:52 +03:00
fbt
840ab9254c export instead of checkout 2015-05-22 17:53:16 +03:00
fbt
b2dc6c01d7 ughx2 2015-02-25 16:30:32 +03:00
2 changed files with 20 additions and 18 deletions

View File

@@ -2,8 +2,8 @@ prm
--- ---
A very simple AUR/ABS helper. Doesn't build packages, only gets the sources. A very simple AUR/ABS helper. Doesn't build packages, only gets the sources.
Usage: prm [flags] <package> Usage: prm [flags] <package>
Flags: Flags:
-h Show this message. -h Show this message.
-s Search for <package>. -s Search for <package>.
-S Search only in the sync db. Implies -s. -S Search only in the sync db. Implies -s.

20
prm
View File

@@ -6,8 +6,7 @@
_self="${0##*/}" _self="${0##*/}"
cfg_workdir="$PWD" cfg_workdir="$PWD"
cfg_aur_url='https://aur.archlinux.org' cfg_aur_url="https://aur.archlinux.org"
cfg_aur_api="${cfg_aur_url}/rpc.php"
err() { printf "$@" >&2; } err() { printf "$@" >&2; }
@@ -66,12 +65,9 @@ aur.get() {
read -r pkg_aur_info read -r pkg_aur_info
{ # A temporary hack till AUR4 becomes the main version
read -r pkg_base read -r pkg_base < <( jshon -e results -e PackageBase -u <<< "$pkg_aur_info" )
read -r tarball_path tarball_path="/cgit/aur.git/snapshot/${pkg_base}.tar.gz"
} < <(
jshon -e results -e PackageBase -u -p -e URLPath -u <<< "$pkg_aur_info"
)
(( flag_force )) || { (( flag_force )) || {
[[ -d "${cfg_workdir}/${pkg_base}" ]] && { [[ -d "${cfg_workdir}/${pkg_base}" ]] && {
@@ -131,7 +127,7 @@ abs.get() {
svn_repo='packages';; svn_repo='packages';;
esac esac
svn checkout "svn://svn.archlinux.org/${svn_repo}/${1}/trunk" "${cfg_workdir}/${1}" svn export "svn://svn.archlinux.org/${svn_repo}/${1}/trunk" "${cfg_workdir}/${1}"
} }
set_argv() { set_argv() {
@@ -188,6 +184,10 @@ main() {
action='search' action='search'
flag_search_syncdb=1;; flag_search_syncdb=1;;
(-u)
cfg_aur_url="$2"
shift;;
(-d) (-d)
if [[ "$action" == 'get' ]]; then if [[ "$action" == 'get' ]]; then
flag_get_deps=1 flag_get_deps=1
@@ -217,6 +217,8 @@ main() {
unset flag_search_aur flag_search_syncdb unset flag_search_aur flag_search_syncdb
} }
cfg_aur_api="${cfg_aur_url}/rpc.php"
[[ "$action" ]] || { [[ "$action" ]] || {
usage usage
return 1 return 1