summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-08-18 17:15:17 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-08-18 17:15:17 (EDT)
commit3fca5b14bb30dca5f33108be1048acbc1c733787 (patch)
treedb41470470cc05f9d10bc29a9a4b24412b2d6ba2 /lib
parentb60f2eac850d71e600ae149515fd94f554e267ee (diff)
install: Add mirror selection, with an -m option
Diffstat (limited to 'lib')
-rw-r--r--lib/cmd/install.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/cmd/install.sh b/lib/cmd/install.sh
index 277510e..08da39d 100644
--- a/lib/cmd/install.sh
+++ b/lib/cmd/install.sh
@@ -21,7 +21,7 @@ use getopt
use feed
use profile
-cmd_install_optstring='a:P:'
+cmd_install_optstring='a:P:m:'
cmd_install_main()
{
@@ -30,6 +30,7 @@ cmd_install_main()
local arch=
local plat=
local profile=
+ local mirror=
get_options "${@}"
shift $(($OPTIND - 1))
@@ -66,6 +67,13 @@ cmd_install_main()
"${arch}" "${plat}"
fi
+ if [ "x${cmd_install_opt_m+set}" = 'xset' ]; then
+ mirror="${cmd_install_opt_m}"
+ else
+ mirror="$(profile_select_mirror)"
+ fi
+ info "$(get_msg 'cmd_install_selected_mirror')" "${mirror}"
+
if [ -d "${chroot}" ]; then
error 2 "$(get_msg 'cmd_install_chroot_dir_exists')" "${chroot}"
fi