Don't exit on package installation failure

This commit is contained in:
2020-06-11 16:16:53 -04:00
parent 1e029fd611
commit e0a8bffe5d

View File

@@ -18,7 +18,7 @@ shopt -s extglob
####################################### #######################################
installJRMC() { installJRMC() {
_scriptversion="0.6-dev" _scriptversion="0.7"
_boardurl="https://yabb.jriver.com/interact/index.php/board,64.0.html" _boardurl="https://yabb.jriver.com/interact/index.php/board,64.0.html"
_outputdir="$_basedir/output" _outputdir="$_basedir/output"
_createrepo_webroot="/srv/jriver" _createrepo_webroot="/srv/jriver"
@@ -392,12 +392,12 @@ EOF
echo "Installing:" "${_pkg_array[@]}" echo "Installing:" "${_pkg_array[@]}"
if [[ -n $_debug ]]; then if [[ -n $_debug ]]; then
if ! _pkg_install "${_pkg_array[@]}"; then if ! _pkg_install "${_pkg_array[@]}"; then
err "Failed to install package" err "Failed to install package. Attempting to continue..."
exit 1 return 1
fi fi
elif ! _pkg_install "${_pkg_array[@]}" > /dev/null 2>&1; then elif ! _pkg_install "${_pkg_array[@]}" > /dev/null 2>&1; then
err "Failed to install package." err "Failed to install package. Attempting to continue..."
_printHelpAndExit 1 return 1
fi fi
fi fi
@@ -406,12 +406,12 @@ EOF
echo "Installing:" "${_url_pkg_array[@]}" echo "Installing:" "${_url_pkg_array[@]}"
if [[ -n $_debug ]]; then if [[ -n $_debug ]]; then
if ! _pkg_install_nogpg "${_url_pkg_array[@]}"; then if ! _pkg_install_nogpg "${_url_pkg_array[@]}"; then
err "Failed to install required package from url" err "Failed to install package. Attempting to continue..."
exit 1 return 1
fi fi
elif ! _pkg_install_nogpg "${_url_pkg_array[@]}" > /dev/null 2>&1; then elif ! _pkg_install_nogpg "${_url_pkg_array[@]}" > /dev/null 2>&1; then
err "Failed to install required package from url" err "Failed to install package. Attempting to continue..."
_printHelpAndExit 1 return 1
fi fi
fi fi
} }