Re: cvsclean script

From: Date: Fri, 02 Nov 2001 13:58:05 +0000
Subject: Re: cvsclean script
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-69526@lists.php.net to get a copy of this message
What problems were those? Which files were leftovers which didn't get deleted? Just add them to .cvsignore ? I haven't noticed any problems.. :) (if it ain't broken, don't fix it :) --Jani On Fri, 2 Nov 2001, Hartmut Holzgraefe wrote: > >i had a closer look at the php4/cvsclean script yesterday as i was >experiencing some problems when running configure that were clearly >related to left-over files from previous runs > >while i thought cvsclean would remove every file not under CVS >control i found in php4/build/build.mk that it only removes files >matching .cvsignore entries ... :( > >so here's a short script that would find out which files to keep >by examining all CVS/Entries files instead: > > >---------------------------------------------------------------------- >#!/bin/sh > >( ># list all file entries within CVS Entries files >for cvsdir in find . -name CVS >do > cvsdir=echo $cvsdir | sed -e's/\/CVS$//' > awk -F / "/[^D].*/ { if(NF>1 && \$1==\"\") print > \"$cvsdir/\"\$2}" \ > $cvsdir/CVS/Entries >done > ># list *all* files >find . -type f -print | grep -v '/CVS/' | grep -v '/CVS$' > ># files listed only once are not CVS-managed, so we remove them ># (files listed in CVS but nonexistant will also appear only ># once, but trying to remove them won't harm so we do not ># take action to identify them here) >) | sort | uniq -u | xargs rm -vf > ># remove empty directories >find . -type d -a -empty | xargs rm -rvf >---------------------------------------------------------------------- > > >i think this is cvsclean done the "RIGHT WAY"(TM) and will check it >in next week if i read no serious objections > > >

« previous php.dev (#69526) next »