OSDN Git Service

A small change is made on distfile cleaning to be exactly accurate.
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sun, 27 Jan 2013 12:32:06 +0000 (21:32 +0900)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sun, 27 Jan 2013 12:32:06 +0000 (21:32 +0900)
modified:   portsreinstall

portsreinstall

index 9146b9c..41ac3fc 100755 (executable)
@@ -10,7 +10,7 @@
 # ================================================
 
 APPNAME=`basename "$0"`
-MYVERSION=2.2.2+toward_2.2.3_20130126162458
+MYVERSION=2.2.2+toward_2.2.3_20130127213145
 
 PREFIX=${PREFIX:-/usr/local}
 CONFFILE=${PREFIX}/etc/${APPNAME}.conf
@@ -1995,7 +1995,7 @@ fi
 if [ ! -e "${DBDIR}/COMPLETE_DISTFILES_LIST" -a $keep_distfiles = no ]
 then
        echo "Starting to summarize distfiles list at `timestamp`"
-       sort -u "${DBDIR}/distfiles.list" 2> /dev/null | str_escape_regexp_filter | sed 's|^|\\/|; s|$|$|' > ${DBDIR}/distfiles.grep.pattern || :
+       sort -u "${DBDIR}/distfiles.list" 2> /dev/null | str_escape_regexp_filter | sed 's|^|^\\.\\/|; s|$|$|' > ${DBDIR}/distfiles.grep.pattern || :
        touch "${DBDIR}/COMPLETE_DISTFILES_LIST"
        echo
 fi
@@ -2848,7 +2848,7 @@ fi
 if [ ! -e "${DBDIR}/COMPLETE_CLEANUP_OBSLETE_DISTFILES" ]
 then
        echo "Starting to clean up obsolete or unused distfiles at `timestamp`"
-       find "${DISTDIR}" -type f | grep -v -E -f "${DBDIR}/distfiles.grep.pattern" | while read distfile
+       ( set -e; cd "${DISTDIR}" && find . -type f ) | grep -v -E -f "${DBDIR}/distfiles.grep.pattern" | while read distfile
        do
                echo "  $distfile"
                rm -f "$distfile"