diff --git a/install-release.sh b/install-release.sh index 1f0866b..16aa178 100644 --- a/install-release.sh +++ b/install-release.sh @@ -214,15 +214,13 @@ judgment_parameters() { install_software() { COMPONENT="$1" - if [[ -n "$(command -v "$COMPONENT")" ]]; then - return - fi - ${PACKAGE_MANAGEMENT_INSTALL} "$COMPONENT" - if [[ "$?" -ne '0' ]]; then + command -v "$COMPONENT" >/dev/null && return + if ${PACKAGE_MANAGEMENT_INSTALL} "$COMPONENT"; then + echo "info: $COMPONENT is installed." + else echo "error: Installation of $COMPONENT failed, please check your network." exit 1 fi - echo "info: $COMPONENT is installed." } version_number() {