diff options
author | P. J. McDermott <pj@pehjota.net> | 2015-05-24 15:20:15 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2015-05-24 15:20:15 (EDT) |
commit | 970a014a211ca37d5591f999391582a3ffc56508 (patch) | |
tree | bdf4df628cc59a5180df8485fd8af6b089ba8019 /lib | |
parent | a7b0fd0a3f7410c1da60097253ea11243fe8ba3e (diff) |
install_system(): Set arch, plat, & mirror if null
Diffstat (limited to 'lib')
-rw-r--r-- | lib/install.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/install.sh b/lib/install.sh index ef89df6..21df480 100644 --- a/lib/install.sh +++ b/lib/install.sh @@ -40,6 +40,24 @@ install_system() local plat="${4}" local chroot="${5}" + if [ "x${arch}" = 'x' ]; then + arch="$(profile_detect_arch)" + fi + if [ "x${plat}" = 'x' ]; then + plat="$(profile_default_plat)" + fi + if ! profile_validate_archplat "${arch}" "${plat}"; then + error 2 "$(get_msg 'cmd_install_bad_archplat')" \ + "${arch}" "${plat}" + fi + info "$(get_msg 'cmd_install_selected_arch')" "${arch}" + info "$(get_msg 'cmd_install_selected_plat')" "${plat}" + + if [ "x${mirror}" = 'x' ]; then + mirror="$(profile_select_mirror)" + fi + info "$(get_msg 'cmd_install_selected_mirror')" "${mirror}" + info "$(get_msg 'cmd_install_setting_up_chroot')" if [ -d "${chroot}" ] && ! dir_is_empty "${chroot}" 'lost+found'; then error 2 "$(get_msg 'cmd_install_chroot_dir_exists')" "${chroot}" |