Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[minor] Add "accept license?" prompt to mas install cmd #196

Merged
merged 5 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions image/cli/mascli/functions/pipeline_config
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ function pipeline_config() {
case $MAS_CHANNEL_SELECTION in
1|8.9|8.9.x)
MAS_CHANNEL=8.9.x
MAS_LICENSE_LINK=$( build_license_link_by_mas_version "89" )
;;

2|8.8|8.8.x)
MAS_CHANNEL=8.8.x
MAS_LICENSE_LINK=$( build_license_link_by_mas_version "88" )
;;

*)
Expand Down Expand Up @@ -102,40 +104,48 @@ function pipeline_config() {
# -----------------------------------------------------------------------
1)
MAS_CHANNEL=8.9.x
MAS_LICENSE_LINK=$( build_license_link_by_mas_version "89" )
MAS_CATALOG_VERSION=v8-230217-amd64
;;
2)
MAS_CHANNEL=8.8.x
MAS_LICENSE_LINK=$( build_license_link_by_mas_version "88" )
MAS_CATALOG_VERSION=v8-230217-amd64
;;
# Jan 2023 Catalog
# -----------------------------------------------------------------------
3)
MAS_CHANNEL=8.9.x
MAS_LICENSE_LINK=$( build_license_link_by_mas_version "89" )
MAS_CATALOG_VERSION=v8-230111-amd64
;;
4)
MAS_CHANNEL=8.8.x
MAS_LICENSE_LINK=$( build_license_link_by_mas_version "88" )
MAS_CATALOG_VERSION=v8-230111-amd64
;;
# Dec 2022 Catalog
# -----------------------------------------------------------------------
5)
MAS_CHANNEL=8.9.x
MAS_LICENSE_LINK=$( build_license_link_by_mas_version "89" )
MAS_CATALOG_VERSION=v8-221228-amd64
;;
6)
MAS_CHANNEL=8.8.x
MAS_LICENSE_LINK=$( build_license_link_by_mas_version "88" )
MAS_CATALOG_VERSION=v8-221228-amd64
;;
# Nov 2022 Catalog
# -----------------------------------------------------------------------
7)
MAS_CHANNEL=8.9.x
MAS_LICENSE_LINK=$( build_license_link_by_mas_version "89" )
MAS_CATALOG_VERSION=v8-221129-amd64
;;
8)
MAS_CHANNEL=8.8.x
MAS_LICENSE_LINK=$( build_license_link_by_mas_version "88" )
MAS_CATALOG_VERSION=v8-221129-amd64
;;
*)
Expand All @@ -145,6 +155,15 @@ function pipeline_config() {
esac
fi
true

echo
echo_h2 "3.1. License Terms"
echo -e "${COLOR_YELLOW} For information about your license, see "$MAS_LICENSE_LINK " To continue with the installation, you must accept the license terms."
prompt_for_confirm "Do you accept the license terms?" LICENSE_RESPONSE

if [[ "$LICENSE_RESPONSE" == "false" ]]; then
exit 1
fi

echo
echo_h2 "4. Configure Operation Mode"
Expand Down
6 changes: 6 additions & 0 deletions image/cli/mascli/functions/utils
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ function echo_hr2() {
echo "-------------------------------------------------------------------------------"
}

function build_license_link_by_mas_version() {
version=$1
link="https://ibm.biz/MAS"$version"-License"
echo $link
}

# Prompt for confirmation to continue
# -----------------------------------------------------------------------------
confirm() {
Expand Down