1
0
Fork 0
forked from mirrors/openup

Fix typo.

Output the complete steps taken to update the script when running
in dry run mode.
This commit is contained in:
Antoine Jacoutot 2013-08-13 14:35:12 +02:00
commit 6f43e19082

22
openup
View file

@ -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
}