diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 2b3750d66..9d8e76abd 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -2,7 +2,7 @@ # # go-xcat - Install xCAT automatically. # -# Version 1.0.45 +# Version 1.0.46 # # Copyright (C) 2016 - 2019 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) @@ -29,8 +29,12 @@ # - Display a list of packages that could not be uninstalled # 2019-11-05 Mark Gurevich # - Display a list of packages that will be installed before "Continue?" +# 2020-5-7 Nic Mays +# - Handles 'stable' as a flag to install latest version via the command: +# go-xcat --xcat-version=stable install # + function usage() { local script="${0##*/}" @@ -72,6 +76,7 @@ function usage() ${script} --yes install ${script} -x 2.12 -y install ${script} --xcat-version=devel install + ${script} --xcat-version=stable install ${script} --xcat-core=/path/to/xcat-core.tar.bz2 \\ --xcat-dep=/path/to/xcat-dep.tar.bz2 install ${script} --xcat-core=http://xcat.org/path/to/xcat-core.tar.bz2 \\ @@ -1322,6 +1327,7 @@ function add_xcat_core_repo_yum_or_zypper() local ver="$2" local tmp="" [[ -z "${ver}" ]] && ver="latest" + if [[ -z "${url}" ]] then case "${ver}" in @@ -1348,6 +1354,7 @@ function add_xcat_core_repo_apt() local ver="$2" local tmp="" [[ -z "${ver}" ]] && ver="latest" + if [[ -z "${url}" ]] then # get the apt.key @@ -1382,6 +1389,7 @@ function add_xcat_dep_repo_yum_or_zypper() local url="$1" local ver="$2" [[ -z "${ver}" ]] && ver="latest" + local tmp="" local install_path="${GO_XCAT_DEFAULT_INSTALL_PATH}" local distro="${GO_XCAT_LINUX_DISTRO}${GO_XCAT_LINUX_VERSION%%.*}" @@ -1450,6 +1458,7 @@ function add_xcat_dep_repo_apt() local url="$1" local ver="$2" [[ -z "${ver}" ]] && ver="latest" + [[ -z "${url}" ]] && url="${GO_XCAT_DEFAULT_BASE_URL}/apt/${ver}/xcat-dep" add_repo_by_url_apt "${url}" "xcat-dep" @@ -1992,6 +2001,10 @@ do ;; "--xcat-version="*) GO_XCAT_VERSION="${1##--xcat-version=}" + if [ "${GO_XCAT_VERSION}" = "stable" ]; + then + GO_XCAT_VERSION="latest" + fi ;; "-y"|"--yes") GO_XCAT_YES=("-y")