mirror of
https://github.com/quickemu-project/quickemu.git
synced 2024-06-10 17:05:22 +02:00
refactor: make zsync_get() consistent with other checks
This commit is contained in:
parent
2e1b556b93
commit
04b37ccf02
11
quickget
11
quickget
|
@ -1290,6 +1290,7 @@ function web_check() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function zsync_get() {
|
function zsync_get() {
|
||||||
|
local CHECK=""
|
||||||
local DIR="${2}"
|
local DIR="${2}"
|
||||||
local FILE="${1##*/}"
|
local FILE="${1##*/}"
|
||||||
local OUT=""
|
local OUT=""
|
||||||
|
@ -1299,13 +1300,9 @@ function zsync_get() {
|
||||||
test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}"
|
test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}"
|
||||||
exit 0
|
exit 0
|
||||||
elif [ "${OPERATION}" == "test" ]; then
|
elif [ "${OPERATION}" == "test" ]; then
|
||||||
if ! web_check "${URL}"; then
|
CHECK=$(web_check "${URL}" && echo 'PASS' || echo 'FAIL')
|
||||||
test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" "FAIL"
|
test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" "${CHECK}"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
|
||||||
test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" "PASS"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
elif command -v zsync &>/dev/null; then
|
elif command -v zsync &>/dev/null; then
|
||||||
if [ -n "${3}" ]; then
|
if [ -n "${3}" ]; then
|
||||||
OUT="${3}"
|
OUT="${3}"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user