forked from evolix/evocheck
check_versions: "IS_CHECK_VERSIONS" was checked but "IS_VERSIONS_CHECK" was echoed, now "IS_CHECK_VERSIONS" everywhere
This commit is contained in:
parent
3c0a88074f
commit
6eeca5eacd
|
@ -13,6 +13,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
check_versions: "IS_CHECK_VERSIONS" was checked but "IS_VERSIONS_CHECK" was echoed, now "IS_CHECK_VERSIONS" everywhere
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
check_debiansecurity: Consider both https://deb\.debian\.org/debian-security/ and https://security\.debian\.org/debian-security/ as valid since both are documented as such.
|
check_debiansecurity: Consider both https://deb\.debian\.org/debian-security/ and https://security\.debian\.org/debian-security/ as valid since both are documented as such.
|
||||||
|
|
14
evocheck.sh
14
evocheck.sh
|
@ -1375,7 +1375,7 @@ download_versions() {
|
||||||
elif is_openbsd; then
|
elif is_openbsd; then
|
||||||
versions_url="https://upgrades.evolix.org/versions-${OPENBSD_RELEASE}"
|
versions_url="https://upgrades.evolix.org/versions-${OPENBSD_RELEASE}"
|
||||||
else
|
else
|
||||||
failed "IS_VERSIONS_CHECK" "error determining os release"
|
failed "IS_CHECK_VERSIONS" "error determining os release"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# fetch timeout, in seconds
|
# fetch timeout, in seconds
|
||||||
|
@ -1388,9 +1388,9 @@ download_versions() {
|
||||||
elif command -v GET; then
|
elif command -v GET; then
|
||||||
GET -t ${timeout}s "${versions_url}" > "${versions_file}"
|
GET -t ${timeout}s "${versions_url}" > "${versions_file}"
|
||||||
else
|
else
|
||||||
failed "IS_VERSIONS_CHECK" "failed to find curl, wget or GET"
|
failed "IS_CHECK_VERSIONS" "failed to find curl, wget or GET"
|
||||||
fi
|
fi
|
||||||
test "$?" -eq 0 || failed "IS_VERSIONS_CHECK" "failed to download ${versions_url} to ${versions_file}"
|
test "$?" -eq 0 || failed "IS_CHECK_VERSIONS" "failed to download ${versions_url} to ${versions_file}"
|
||||||
}
|
}
|
||||||
get_command() {
|
get_command() {
|
||||||
local program
|
local program
|
||||||
|
@ -1452,11 +1452,11 @@ check_version() {
|
||||||
actual_version=$(get_version "${program}" "${command}")
|
actual_version=$(get_version "${program}" "${command}")
|
||||||
# printf "program:%s expected:%s actual:%s\n" "${program}" "${expected_version}" "${actual_version}"
|
# printf "program:%s expected:%s actual:%s\n" "${program}" "${expected_version}" "${actual_version}"
|
||||||
if [ -z "${actual_version}" ]; then
|
if [ -z "${actual_version}" ]; then
|
||||||
failed "IS_VERSIONS_CHECK" "failed to lookup actual version of ${program}"
|
failed "IS_CHECK_VERSIONS" "failed to lookup actual version of ${program}"
|
||||||
elif dpkg --compare-versions "${actual_version}" lt "${expected_version}"; then
|
elif dpkg --compare-versions "${actual_version}" lt "${expected_version}"; then
|
||||||
failed "IS_VERSIONS_CHECK" "${program} version ${actual_version} is older than expected version ${expected_version}"
|
failed "IS_CHECK_VERSIONS" "${program} version ${actual_version} is older than expected version ${expected_version}"
|
||||||
elif dpkg --compare-versions "${actual_version}" gt "${expected_version}"; then
|
elif dpkg --compare-versions "${actual_version}" gt "${expected_version}"; then
|
||||||
failed "IS_VERSIONS_CHECK" "${program} version ${actual_version} is newer than expected version ${expected_version}, you should update tour index."
|
failed "IS_CHECK_VERSIONS" "${program} version ${actual_version} is newer than expected version ${expected_version}, you should update tour index."
|
||||||
else
|
else
|
||||||
: # Version check OK
|
: # Version check OK
|
||||||
fi
|
fi
|
||||||
|
@ -1485,7 +1485,7 @@ check_versions() {
|
||||||
if [ -n "${version}" ]; then
|
if [ -n "${version}" ]; then
|
||||||
check_version "${program}" "${version}"
|
check_version "${program}" "${version}"
|
||||||
else
|
else
|
||||||
failed "IS_VERSIONS_CHECK" "failed to lookup expected version for ${program}"
|
failed "IS_CHECK_VERSIONS" "failed to lookup expected version for ${program}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue