diff --git a/openup b/openup index a4771ad..58b5346 100755 --- a/openup +++ b/openup @@ -61,7 +61,7 @@ fi _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 @@ -123,18 +123,22 @@ update_self() { fi _N=$(grep -Eo '^OPENUP_VERSION=.*' ${TMPUPD} | awk -F '=' '{ print $2 }') - if [ -z "${DRYRUN}" -a -n "${_N}" ]; then - if [ "${OPENUP_VERSION}" -lt "${_N}" ]; then - print3 "Updating openup from version ${OPENUP_VERSION} to version ${_N}" + if [ -n "${_N}" -o -n "${DRYRUN}" ]; then + if [ "${OPENUP_VERSION}" -lt "${_N}" -o -n "${DRYRUN}" ]; then + print3 "Updating openup to the latest release" _CMD="cat ${TMPUPD} >${MEESA}" print_arrow "${_CMD}" - eval ${_CMD} || exit 1 - rtn=$? - print3 "openup updated to version ${_N}, restarting" + if [ -z "${DRYRUN}" ]; then + eval ${_CMD} || exit 1 + rtn=$? + fi + print3 "openup has been updated, restarting" _CMD="${MEESA} -U $@" print_arrow "${_CMD}" - eval ${_CMD} - exit $rtn + if [ -z "${DRYRUN}" ]; then + eval ${_CMD} + exit $rtn + fi fi fi }