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) _BPLIST=$(pkg_info -q |grep binpatch)
if [ -n "${_BPLIST}" ]; then if [ -n "${_BPLIST}" ]; then
_i=$(echo ${_BPLIST} | wc -w) _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 if [ "${_i}" -ne "${_v}" ]; then
error "Binpatch(es) from a previous release installed" error "Binpatch(es) from a previous release installed"
fi fi
@ -123,18 +123,22 @@ update_self() {
fi fi
_N=$(grep -Eo '^OPENUP_VERSION=.*' ${TMPUPD} | awk -F '=' '{ print $2 }') _N=$(grep -Eo '^OPENUP_VERSION=.*' ${TMPUPD} | awk -F '=' '{ print $2 }')
if [ -z "${DRYRUN}" -a -n "${_N}" ]; then if [ -n "${_N}" -o -n "${DRYRUN}" ]; then
if [ "${OPENUP_VERSION}" -lt "${_N}" ]; then if [ "${OPENUP_VERSION}" -lt "${_N}" -o -n "${DRYRUN}" ]; then
print3 "Updating openup from version ${OPENUP_VERSION} to version ${_N}" print3 "Updating openup to the latest release"
_CMD="cat ${TMPUPD} >${MEESA}" _CMD="cat ${TMPUPD} >${MEESA}"
print_arrow "${_CMD}" print_arrow "${_CMD}"
eval ${_CMD} || exit 1 if [ -z "${DRYRUN}" ]; then
rtn=$? eval ${_CMD} || exit 1
print3 "openup updated to version ${_N}, restarting" rtn=$?
fi
print3 "openup has been updated, restarting"
_CMD="${MEESA} -U $@" _CMD="${MEESA} -U $@"
print_arrow "${_CMD}" print_arrow "${_CMD}"
eval ${_CMD} if [ -z "${DRYRUN}" ]; then
exit $rtn eval ${_CMD}
exit $rtn
fi
fi fi
fi fi
} }