aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xauria.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/auria.sh b/auria.sh
index 714980e..fd90df5 100755
--- a/auria.sh
+++ b/auria.sh
@@ -485,7 +485,7 @@ function resolve_deps
aur_deps["$pkg"]="$(printf " %s " "${deps[@]}" "${makedeps[@]}")"
aur_deps_test["$pkg"]="${aur_deps["$pkg"]}"
- if [ ${#dep} -eq 0 ]
+ if (( ${#deps} + ${#makedeps} == 0 ))
then
aur_pkgorder+=("$pkg")
else
@@ -506,16 +506,19 @@ function make_pkgorder
{
local pkg
+ test -n "${aur_pkgorder[$i]}" && return 0
+
+
## Go up the reverse tree from bottom to top.
local -i i=0
- while [ $i -lt ${#aur_pkgorder} ]
+ while test -n "${aur_pkgorder[$i]}"
do
pkg="${aur_pkgorder[$i]}"
# Remove the resolved package off the dependency tree.
# Note, that the reverse dependencies do not require removal.
- for revdep in "${aur_revdeps["$pkg"]}"
+ for revdep in ${aur_revdeps["$pkg"]}
do
aur_deps["$revdep"]="${aur_deps["$revdep"]/ $pkg /}"
if test -z "${aur_deps["$revdep"]}"
@@ -523,6 +526,7 @@ function make_pkgorder
aur_pkgorder+=("$revdep")
fi
done
+ i+=1
done
if test -n "${aur_deps["$pkg"]}"
@@ -548,7 +552,7 @@ function install_deptree
# Remove the resolved package off the dependency tree.
# Note, that the reverse dependencies do not require removal.
- for revdep in "${aur_revdeps["$pkg"]}"
+ for revdep in ${aur_revdeps["$pkg"]}
do
aur_deps["$revdep"]="${aur_deps["$revdep"]/ $pkg /}"
if test -z "${aur_deps["$revdep"]}"
@@ -635,7 +639,7 @@ function guess_vcs
# interactive (<- update).
function update_all
{
- for pkg in "$(pacman -Qmq)"
+ for pkg in $(pacman -Qmq)
do
update "$pkg"
done