From 5991bd6da60c99d90ac25378edbda2a9dfc5cb60 Mon Sep 17 00:00:00 2001 From: Brooke Kuhlmann Date: Sat, 24 Dec 2022 07:35:00 -0700 Subject: [PATCH] Refactored download file function to use multi-line curl command Improves readability so the command isn't word wrapped. --- lib/installers.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/installers.sh b/lib/installers.sh index df82cea..544b88f 100644 --- a/lib/installers.sh +++ b/lib/installers.sh @@ -11,8 +11,16 @@ download_file() { printf "%s\n" "Downloading $1..." clean_work_path - mkdir $MAC_OS_WORK_PATH - curl --header "$http_header" --location --retry 3 --retry-delay 5 --fail --silent --show-error "$url" >> "$MAC_OS_WORK_PATH/$file_name" + mkdir "$MAC_OS_WORK_PATH" + + curl --header "$http_header" \ + --location \ + --retry 3 \ + --retry-delay 5 \ + --fail \ + --silent \ + --show-error \ + "$url" >> "$MAC_OS_WORK_PATH/$file_name" } export -f download_file