summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/cmd/install.sh4
-rw-r--r--locale/en_US.sh2
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/cmd/install.sh b/lib/cmd/install.sh
index 1322209..a296891 100644
--- a/lib/cmd/install.sh
+++ b/lib/cmd/install.sh
@@ -59,6 +59,10 @@ cmd_install_main()
if [ "x${cmd_install_opt_P+set}" = 'xset' ]; then
plat="${cmd_install_opt_P}"
fi
+ if ! profile_validate_archplat "${arch}" "${plat}"; then
+ error 2 "$(get_msg 'cmd_install_bad_archplat')" \
+ "${arch}" "${plat}"
+ fi
if ! mkdir "${chroot}" || ! mkdir "${chroot}/.prokit"; then
: Error
diff --git a/locale/en_US.sh b/locale/en_US.sh
index 4e22ef3..6bf403a 100644
--- a/locale/en_US.sh
+++ b/locale/en_US.sh
@@ -57,6 +57,8 @@ There is NO WARRANTY, to the extent permitted by law.'
# lib/cmd/install.sh
msg_prokit_cmd_install_summary='install a ProteanOS system into a directory'
msg_prokit_cmd_install_usage='[-a <arch>] [-P <plat>] <suite> <chroot>'
+msg_prokit_cmd_install_bad_archplat='Invalid combination of architecture "%s" '\
+'and platform "%s"'
# lib/profile.sh
msg_prokit_profile_not_found='Profile "%s" not found'