From 472f94bb2241e760854fabd9042ffc3a00afb5db Mon Sep 17 00:00:00 2001 From: neo954 Date: Thu, 3 Nov 2016 02:39:07 -0500 Subject: [PATCH] [go-xcat] Fix GitHub issue #1998 (#2059) * [go-xcat] Fix GitHub issue #1998, print out friendly error messages when no xcat paackages installed on updating * [go-xcat] GitHub pull request #2059, change error message base on the comment of @whowutwut --- xCAT-server/share/xcat/tools/go-xcat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 6e82a6929..fc2449872 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.9 +# Version 1.0.10 # # Copyright (C) 2016 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) @@ -1188,6 +1188,9 @@ function update_xcat() [[ "${ver}" = "(not installed)" ]] && unset "install_list[${i}]" done < <(check_package_version "${install_list[@]}") + [[ "${#install_list[@]}" -gt "0" ]] + warn_if_bad "$?" "xCAT is not installed." + exit_if_bad "$?" "In order to install xCAT, please rerun with \`${0##*/} install'." install_packages "$@" "${install_list[@]}" }