Refactored download file function to use multi-line curl command
Improves readability so the command isn't word wrapped.
This commit is contained in:
@@ -11,8 +11,16 @@ download_file() {
|
|||||||
|
|
||||||
printf "%s\n" "Downloading $1..."
|
printf "%s\n" "Downloading $1..."
|
||||||
clean_work_path
|
clean_work_path
|
||||||
mkdir $MAC_OS_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"
|
|
||||||
|
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
|
export -f download_file
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user