paper: download default configs before patching (#3004)

This commit is contained in:
Geoff Bourne
2024-07-20 13:15:16 -05:00
committed by GitHub
parent 0ff8e68f01
commit d7c6a7d2b6
4 changed files with 29 additions and 0 deletions

View File

@@ -265,10 +265,17 @@ function compare_version() {
}
function versionLessThan() {
local oldState
# The return status when listing options is zero if all optnames are enabled, non- zero otherwise.
oldState=$(shopt -po xtrace || true)
shopt -u -o xtrace
# Use if-else since strict mode might be enabled
if compare_version "${VERSION}" "lt" "${1?}"; then
eval "$oldState"
return 0
else
eval "$oldState"
return 1
fi
}