forked from kiss-community/kiss
pkg_install: simplify sort
This commit is contained in:
parent
857f03fd88
commit
21a11c65e0
23
kiss
23
kiss
@ -945,22 +945,19 @@ args() {
|
|||||||
i|install)
|
i|install)
|
||||||
# Create a list of each package's dependencies.
|
# Create a list of each package's dependencies.
|
||||||
for pkg; do
|
for pkg; do
|
||||||
if [ "${pkg%%*.tar.gz}" ]; then
|
case $pkg in
|
||||||
pkg_depends "$pkg"
|
*.tar.gz) missing_deps="$missing_deps $pkg " ;;
|
||||||
else
|
*) pkg_depends "$pkg"
|
||||||
missing_deps="$missing_deps $pkg "
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Filter the list, only including explicit packages.
|
|
||||||
for pkg in $missing_deps; do
|
|
||||||
case " $* " in
|
|
||||||
*" $pkg "*) install_pkgs="$install_pkgs $pkg " ;;
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
for pkg in $install_pkgs; do
|
# Filter the list, only installing explicit packages.
|
||||||
pkg_install "$pkg"
|
# The purpose of these two loops is to order the
|
||||||
|
# argument list based on dependence.
|
||||||
|
for pkg in $missing_deps; do
|
||||||
|
case " $* " in
|
||||||
|
*" $pkg "*) pkg_install "$pkg" ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user