1
0
Fork 0
forked from mirrors/openup

Fix check for unsupported releases.

This commit is contained in:
Antoine Jacoutot 2013-11-01 12:32:53 +01:00
commit 18645a958b

7
openup
View file

@ -37,7 +37,7 @@ VUXML_URL="https://stable.mtier.org/vuxml/$(uname -r | tr -d '.').xml"
########################################################################
_OPENUP_VERSION=12
_OPENUP_VERSION=13
_OPENUP_MINREL=53
usage() {
@ -75,7 +75,10 @@ fi
set -A _REL -- $(sysctl -n kern.version | sed 's/^OpenBSD \([0-9]\.[0-9]\)\([^ ]*\).*/\1 \2/;q')
_REL_INT="$(echo ${_REL[0]} | tr -d '.')"
if [ "${_REL[1]}" == -!(stable) -o "${_REL_INT}" -lt "${_OPENUP_MINREL}" ]; then
if [ -n "${_REL[1]}" -a "${_REL[1]}" != "-stable" ]; then _badrel=1; fi
if [ "${_REL_INT}" -lt "${_OPENUP_MINREL}" ]; then _badrel=1; fi
if [ -n "${_badrel}" ]; then
pr_error "${_REL[0]}${_REL[1]} is not a supported release"
exit 1
fi