fix: fix function install_software
parent
684560061f
commit
77646917bb
|
@ -214,15 +214,13 @@ judgment_parameters() {
|
||||||
|
|
||||||
install_software() {
|
install_software() {
|
||||||
COMPONENT="$1"
|
COMPONENT="$1"
|
||||||
if [[ -n "$(command -v "$COMPONENT")" ]]; then
|
command -v "$COMPONENT" >/dev/null && return
|
||||||
return
|
if ${PACKAGE_MANAGEMENT_INSTALL} "$COMPONENT"; then
|
||||||
fi
|
echo "info: $COMPONENT is installed."
|
||||||
${PACKAGE_MANAGEMENT_INSTALL} "$COMPONENT"
|
else
|
||||||
if [[ "$?" -ne '0' ]]; then
|
|
||||||
echo "error: Installation of $COMPONENT failed, please check your network."
|
echo "error: Installation of $COMPONENT failed, please check your network."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "info: $COMPONENT is installed."
|
|
||||||
}
|
}
|
||||||
|
|
||||||
version_number() {
|
version_number() {
|
||||||
|
|
Loading…
Reference in New Issue