get AUR deps too

This commit is contained in:
Jack L. Frost 2015-01-27 19:17:26 +03:00
parent c1324aeccc
commit aa4062634c

20
zpac
View File

@ -26,10 +26,27 @@ aur.get() {
cd "$cfg_workdir"
echo "Downloading $tarball_url"
{ curl "$tarball_url" | gzip -d | tar x; } || {
{ curl -skL "$tarball_url" | gzip -d | tar x; } || {
err "Fail!"
return 1
}
echo ": ${cfg_workdir}/${1}"
if (( flag_get_deps )); then
cd "${cfg_workdir}/${1}"
source PKGBUILD
for i in "${depends[@]}" "${makedepends[@]}"; do
dep_name="${i/[<>=]*}"
dep_repo=$(package-query -1 -AS -f '%r' "${dep_name}")
if [[ "$dep_repo" == 'aur' ]]; then
[[ -d "${cfg_workdir}/${dep_name}" ]]
aur.get "$dep_name" || { return "$?"; }
fi
done
fi
}
abs.get() {
@ -52,6 +69,7 @@ main() {
-s) action='search';;
-d) action='get';;
-D) flag_get_deps=1;;
--) shift; break;;
-*)