diff --git a/zpac b/zpac index b7710c4..980451d 100755 --- a/zpac +++ b/zpac @@ -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;; -*)