From: Mamoru Sakaue / MwGhennndo Date: Fri, 10 Aug 2012 04:37:58 +0000 (+0900) Subject: Bug fix for self-update in case that no package of portsreinstall is installed. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4a752b70541df14d623f5eafdcc6a06f1595c99e;p=portsreinstall%2Fcurrent.git Bug fix for self-update in case that no package of portsreinstall is installed. modified: portsreinstall modified: portsreinstall~ --- diff --git a/portsreinstall b/portsreinstall index 76d956d..40d5cdc 100755 --- a/portsreinstall +++ b/portsreinstall @@ -10,7 +10,7 @@ # ================================================ APPNAME=`basename "$0"` -MYVERSION=1.1.0+toward_2.0.0_20120810130509 +MYVERSION=1.1.0+toward_2.0.0_20120810132451 PREFIX=${PREFIX:-/usr/local} CONFFILE=${PREFIX}/etc/${APPNAME}.conf @@ -1044,7 +1044,7 @@ fi # Update portsreinstall itself if it is newer in the ports tree if [ $supress_self_upadte = no -a `id -u` -eq 0 -a \( ! -e "${DBDIR}" -o ${_STATUS_DB_OBSOLETE} = yes \) ] then - pkg_info -Ex "${APPNAME}-[0-9].*" > ${TMPDIR}/self_version + pkg_info -Ex "${APPNAME}-[0-9].*" > ${TMPDIR}/self_version || : num_self_versions=`cat "${TMPDIR}"/self_version | wc -l` if [ $num_self_versions -gt 1 ] then diff --git a/portsreinstall~ b/portsreinstall~ index a74ad59..6f201fc 100755 --- a/portsreinstall~ +++ b/portsreinstall~ @@ -10,7 +10,7 @@ # ================================================ APPNAME=`basename "$0"` -MYVERSION=1.1.0+toward_2.0.0_20120808081529 +MYVERSION=1.1.0+toward_2.0.0_20120810130509 PREFIX=${PREFIX:-/usr/local} CONFFILE=${PREFIX}/etc/${APPNAME}.conf @@ -1044,7 +1044,7 @@ fi # Update portsreinstall itself if it is newer in the ports tree if [ $supress_self_upadte = no -a `id -u` -eq 0 -a \( ! -e "${DBDIR}" -o ${_STATUS_DB_OBSOLETE} = yes \) ] then - pkg_info -Ex "${APPNAME}-[0-9].*" > ${TMPDIR}/self_version + pkg_info -Ex "${APPNAME}-[0-9].*" > ${TMPDIR}/self_version || : num_self_versions=`cat "${TMPDIR}"/self_version | wc -l` if [ $num_self_versions -gt 1 ] then