From 9c719846187e702fba022d602b5fe9a88ae5809a Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 17 Aug 2014 20:49:50 -0400 Subject: install: Validate architecture and platform --- 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 ] [-P ] ' +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' -- cgit v0.9.1