From 806910046d8838c56b9ccdf02b96b3e5e54e36b4 Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Tue, 13 Aug 2013 15:34:25 +0200 Subject: [PATCH] Better regex. --- openup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openup b/openup index 58b5346..f585a80 100755 --- a/openup +++ b/openup @@ -58,10 +58,10 @@ if ! grep -q installpath /etc/pkg.conf 2>/dev/null; then fi # check that we have no installed binpatches from a previous release -_BPLIST=$(pkg_info -q |grep binpatch) +_BPLIST=$(pkg_info -q | grep "^binpatch") if [ -n "${_BPLIST}" ]; then _i=$(echo ${_BPLIST} | wc -w) - _v=$(echo ${_BPLIST} | grep binpatch${REL_INT} | wc -w) + _v=$(echo ${_BPLIST} | grep "^binpatch${REL_INT}" | wc -w) if [ "${_i}" -ne "${_v}" ]; then error "Binpatch(es) from a previous release installed" fi