Optionally rerun installJRMC on repo failure
This commit is contained in:
12
installJRMC
12
installJRMC
@@ -701,16 +701,12 @@ install_mc_repo() {
|
||||
|
||||
# Update package lists
|
||||
if ! execute "${PKG_UPDATE[@]}"; then
|
||||
error=$?
|
||||
debug "Error code: $error"
|
||||
err "Package update failed!"
|
||||
if [[ $error -eq 100 ]]; then
|
||||
if [[ $MC_REPO != "$MC_REPO_HARDCODE" ]] &&
|
||||
ask_ok "Re-run installJRMC with --mcrepo=$MC_REPO_HARDCODE?"; then
|
||||
exec "$SCRIPT_PATH" "$@" "--no-update" "--mcrepo=$MC_REPO_HARDCODE"
|
||||
fi
|
||||
if [[ $MC_REPO != "$MC_REPO_HARDCODE" ]] &&
|
||||
ask_ok "Re-run installJRMC with --mcrepo=$MC_REPO_HARDCODE?"; then
|
||||
exec "$SCRIPT_PATH" "$@" "--no-update" "--mcrepo=$MC_REPO_HARDCODE"
|
||||
fi
|
||||
return 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "Installing $MC_PKG package"
|
||||
|
||||
Reference in New Issue
Block a user