Apply suggestions from code review

pull/93/head
IceCodeNew 2020-09-19 16:44:19 +08:00 committed by GitHub
parent ad20aeacbe
commit 576774c2fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -31,11 +31,11 @@ check_if_running_as_root() {
}
download_files() {
if ! curl -L -H 'Cache-Control: no-cache' -o "${dir_tmp}/${2}" "${1}/${2}"; then
if ! curl -L -H 'Cache-Control: no-cache' -o "${dir_tmp}/${2}" "${1}"; then
echo 'error: Download failed! Please check your network or try again.'
exit 1
fi
if ! curl -L -H 'Cache-Control: no-cache' -o "${dir_tmp}/${2}.sha256sum" "${1}/${2}.sha256sum"; then
if ! curl -L -H 'Cache-Control: no-cache' -o "${dir_tmp}/${2}.sha256sum" "${1}.sha256sum"; then
echo 'error: Download failed! Please check your network or try again.'
exit 1
fi