Date: Wed, 23 Nov 2011 03:15:35 +0000 (UTC) From: Mark Linimon <linimon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r227858 - projects/portbuild/scripts Message-ID: <201111230315.pAN3FZR6022461@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: linimon (doc,ports committer) Date: Wed Nov 23 03:15:34 2011 New Revision: 227858 URL: http://svn.freebsd.org/changeset/base/227858 Log: Try to make more robust. Modified: projects/portbuild/scripts/dodistfiles Modified: projects/portbuild/scripts/dodistfiles ============================================================================== --- projects/portbuild/scripts/dodistfiles Wed Nov 23 03:14:54 2011 (r227857) +++ projects/portbuild/scripts/dodistfiles Wed Nov 23 03:15:34 2011 (r227858) @@ -40,9 +40,13 @@ cd ${distdir} || exit 1 echo "Removing incomplete downloads" -# XXX MCL put an existance test here -find ${distdir}/.pbtmp/ -name .done -depth 2 | sed -e 's,/.done$,/,' | sort > .done || exit 1 -find -d ${distdir}/.pbtmp/ -type d -mindepth 1 |sed -E -e 's,([^/])$,\1/,' > .alldirs || exit 1 +if [ -d ${distdir}/.pbtmp/ ]; then + find ${distdir}/.pbtmp/ -name .done -depth 2 | sed -e 's,/.done$,/,' | sort > .done || exit 1 + find -d ${distdir}/.pbtmp/ -type d -mindepth 1 |sed -E -e 's,([^/])$,\1/,' > .alldirs || exit 1 +else + cp /dev/null .done + cp /dev/null .alldirs +fi sed -E -e "s,^(${distdir}/.pbtmp/[^/]+/).*,\1," < .alldirs | sort -u > .pkgdirs @@ -66,12 +70,13 @@ done cat .pkgsubdirs | xargs rmdir || exit 1 echo "Moving remaining distfiles" -# XXX MCL put an existance test here -find ${distdir}/.pbtmp/ -type f -depth 2 \! -name .done | xargs -J % mv % ${distdir} +if [ -d ${distdir}/.pbtmp/ ]; then + find ${distdir}/.pbtmp/ -type f -depth 2 \! -name .done | xargs -J % mv % ${distdir} +fi echo "Cleaning up" sed -e 's,$,.done,' < .pkgdirs | xargs rm -f || exit 1 cat .pkgdirs | xargs rmdir || exit 1 -rmdir .pbtmp || exit 1 +rmdir .pbtmp 2> /dev/null || exit 1 rm -f .alldirs .done .pkgdirs .pkgsubdirs .subdirs || exit 1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111230315.pAN3FZR6022461>