From b41b75ff64b4ac895d9d78e47f879a4aa9ac93ae Mon Sep 17 00:00:00 2001 From: bryan Date: Mon, 4 Nov 2024 11:09:06 -0500 Subject: [PATCH] Use exit codes, don't wrap download() with execute() --- installJRMC | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/installJRMC b/installJRMC index 0812985..1c79686 100755 --- a/installJRMC +++ b/installJRMC @@ -664,7 +664,7 @@ acquire_deb() { # Loop through the repositories and attempt to download for repo in "${repos[@]}"; do echo "Checking $repo for DEB package" - if execute download "$repo" "$MC_DEB"; then + if download "$repo" "$MC_DEB"; then echo "Found" break fi @@ -1713,12 +1713,12 @@ download() { fi if [[ ${download_cmd[0]} == "wget" ]]; then - "${download_cmd[@]}" --output-document="${output:--}" "$url" || return 1 + "${download_cmd[@]}" --output-document="${output:--}" "$url" elif [[ ${download_cmd[0]} == "curl" ]]; then if [[ -n "$output" ]]; then - "${download_cmd[@]}" --output "$output" "$url" || return 1 + "${download_cmd[@]}" --output "$output" "$url" else - "${download_cmd[@]}" "$url" || return 1 + "${download_cmd[@]}" "$url" fi else err "Unsupported download command: ${download_cmd[*]}"