OSDN Git Service

Bug fix for self-update in case that no package of portsreinstall is installed.
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Fri, 10 Aug 2012 04:37:58 +0000 (13:37 +0900)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Fri, 10 Aug 2012 04:37:58 +0000 (13:37 +0900)
modified:   portsreinstall
modified:   portsreinstall~

portsreinstall
portsreinstall~

index 76d956d..40d5cdc 100755 (executable)
@@ -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
index a74ad59..6f201fc 100755 (executable)
@@ -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