summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2013-12-02 21:35:53 (EST)
committer P. J. McDermott <pj@pehjota.net>2014-08-15 08:46:23 (EDT)
commit6c02331b88c01e3f21081163acc19d81d16122e2 (patch)
treef5087f889de2f45090c95fa5d07ef0d09caf724b
parentfc87d6b35174ee496c55aaf5d7056a278e6b03bb (diff)
cmd_install_find_pkgs(): New function
-rw-r--r--lib/cmd/install.sh29
1 files changed, 25 insertions, 4 deletions
diff --git a/lib/cmd/install.sh b/lib/cmd/install.sh
index 982e9b5..4c7d166 100644
--- a/lib/cmd/install.sh
+++ b/lib/cmd/install.sh
@@ -54,8 +54,29 @@ cmd_install_main()
profile='proteanos'
fi
- printf 'Profile: %s\n' "${profile}"
- printf 'Suite: %s\n' "${suite}"
- printf 'Architecture: %s\n' "${arch}"
- printf 'Platform: %s\n' "${plat}"
+ if ! mkdir "${chroot}"; then
+ : Error
+ fi
+
+ cmd_install_find_pkgs "${profile}" "${suite}" "${arch}" "${plat}" \
+ "${chroot}"
+}
+
+cmd_install_find_pkgs()
+{
+ local profile="${1}"
+ local suite="${2}"
+ local arch="${3}"
+ local plat="${4}"
+ local chroot="${5}"
+ local feed=
+
+ profile_set "${profile}"
+
+ for feed in $(profile_feeds); do
+ feed_find_pkgs 'profile_include_pkg' "$(profile_dep_fields)" \
+ "${chroot}/.depends" <<-EOF
+ $(feed_download "${feed}")
+ EOF
+ done
}