Failed retrieval of a ports distfiles can leave a file containing
an ampersand in its name in ${DISTDIR}.  The following patch lets
ports/infrastructure/fetch/clean-old cope with this.

ok?

- Marc Balmer

Index: clean-old
===================================================================
RCS file: /cvs/ports/infrastructure/fetch/clean-old,v
retrieving revision 1.1
diff -u -r1.1 clean-old
--- clean-old   6 Dec 2000 11:55:11 -0000       1.1
+++ clean-old   4 Jun 2005 16:28:35 -0000
@@ -48,5 +48,5 @@
 find . -type f -print|sed -e 's,^\./,,' |grep -v '^Makefile$' |sort -u >$TMP2
 echo "#! /bin/sh"
 echo "cd $DISTDIR"
-diff -u $TMP1 $TMP2|tail +3|grep '^\+'|sed -e 's,^\+,rm ,'
+diff -u $TMP1 $TMP2|tail +3|grep '^\+'|sed -e 's,^\+,rm ,'|sed -e 's,&,\\&,'
 rm $TMP1 $TMP2

Reply via email to