From 4e408246498b259c146a66f9bfa82fa5e3fad48d Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Mon, 26 Aug 2013 11:20:33 +0200 Subject: [PATCH] Minor tweaks. --- openup | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/openup b/openup index e7343a4..fceb201 100755 --- a/openup +++ b/openup @@ -27,7 +27,9 @@ PKG_PATH_MAIN="http://ftp.fr.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(arch PKG_PATH_UPDATE="https://stable.mtier.org/updates/$(uname -r)/$(arch -s)" ### end of user defined variables -### DO NOT MODIFY ANYTHING BELOW THIS LINE!!! +######################################################################## +### DO NOT MODIFY ANYTHING BELOW THIS LINE!!! # +######################################################################## _OPENUP_VERSION=3 _OPENUP_MINREL=53 @@ -41,8 +43,9 @@ usage() { exit 1 } -pr_error() { +error() { echo "!!! ${@}" + exit 1 } if [ "$(id -u)" -ne 0 ]; then @@ -55,8 +58,7 @@ set -A _REL -- $(sysctl -n kern.version | sed 's/^OpenBSD \([0-9]\.[0-9]\)\([^ ] _REL_INT="$(echo ${_REL[0]} | tr -d '.')" if [ "${_REL[1]}" == -!(stable) -o "${_REL_INT}" -lt "${_OPENUP_MINREL}" ]; then - pr_error "${_REL[0]}${_REL[1]} is not a supported release" - exit 1 + error "${_REL[0]}${_REL[1]} is not a supported release" fi # check that we have no installed binpatches from a previous release @@ -65,8 +67,7 @@ if [ -n "${_BPLIST}" ]; then _i=$(echo ${_BPLIST} | wc -w) _v=$(echo ${_BPLIST} | grep "^binpatch${_REL_INT}" | wc -w) if [ "${_i}" -ne "${_v}" ]; then - pr_error "Binpatch(es) from a previous release installed" - exit 1 + error "Binpatch(es) from a previous release installed" fi fi unset _BPLIST