Date: Tue, 10 May 2011 07:12:11 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r221725 - user/dougb/portmaster Message-ID: <201105100712.p4A7CBFI031515@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougb Date: Tue May 10 07:12:11 2011 New Revision: 221725 URL: http://svn.freebsd.org/changeset/base/221725 Log: Small refinement for unlink'ing, in parent_exit the glob pattern in the for loop will return 'pattern-*' if there are no matches, so test for that specifically rather than returning to the conditional version. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Tue May 10 05:33:37 2011 (r221724) +++ user/dougb/portmaster/portmaster Tue May 10 07:12:11 2011 (r221725) @@ -145,7 +145,10 @@ parent_exit () { pm_rmdir_s $pbu fi - for f in ${TMPDIR}/f-${PM_PARENT_PID}-*; do /bin/unlink $f ; done + for f in ${TMPDIR}/f-${PM_PARENT_PID}-*; do + case "$f" in */f-${PM_PARENT_PID}-\*) continue ;; esac + /bin/unlink $f + done [ -n "$PM_WRKDIRPREFIX" ] && find -d $PM_WRKDIRPREFIX -mindepth 1 -type d -empty -delete 2>/dev/null
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105100712.p4A7CBFI031515>