Re: a script to remove empty directories

2004-02-22 Thread Andreas Seidl
Igor Pechtchanski wrote: Here's a variant of the above that works with spaces in filenames (but doesn't delete directories that contain only empty directories): find $ROOT -depth -type d -empty -print0 |xargs -0 rmdir -f However, does anyone care to submit a patch to the generic-build-script?

Re: a script to remove empty directories

2004-02-22 Thread Igor Pechtchanski
On Sun, 22 Feb 2004, Andreas Seidl wrote: Igor Pechtchanski wrote: Here's a variant of the above that works with spaces in filenames (but doesn't delete directories that contain only empty directories): find $ROOT -depth -type d -empty -print0 |xargs -0 rmdir -f However, does anyone

a script to remove empty directories

2004-02-19 Thread Andreas Seidl
Igor Pechtchanski wrote: On Wed, 18 Feb 2004, Andreas Seidl wrote: Hmm, wouldn't the generic build script be the place to add functionality to remove empty directories? Doing it by hand adds work, and even worse, is a possible source for bugs, as a newer release might have actually files in

Re: a script to remove empty directories

2004-02-19 Thread Bruce Ingalls
Andreas Seidl wrote: Igor Pechtchanski wrote: On Wed, 18 Feb 2004, Andreas Seidl wrote: Hmm, wouldn't the generic build script be the place to add functionality to remove empty directories? Doing it by hand adds work, and even worse, is a possible source for bugs, as a newer release might

Re: a script to remove empty directories

2004-02-19 Thread Dr. Volker Zell
Andreas == Andreas Seidl writes: Andreas I have written the following script, which is as good as I can do at Andreas the moment. Andreas - begin - Andreas #!/usr/bin/bash Andreas # rmed -- remove empty directories recursively Andreas # usage: rmed [DIR] where

Re: a script to remove empty directories

2004-02-19 Thread Andreas Seidl
Bruce Ingalls wrote: Anyhow, here is an elegant, working solution. If no optional dir is passed, then the current dir is checked recursively, and empty subdirectories are passed. #!/bin/bash ROOT=${1:-.} if [ ! -d $ROOT ];then ROOT=.;fi find $ROOT -type d -empty|xargs rmdir - Meanwhile I was

Re: a script to remove empty directories

2004-02-19 Thread Andreas Seidl
Dr. Volker Zell wrote: Here is another one from o http://www.shelldorado.com/scripts/categories.html I searched with Google, but did not find it... --- cut here --- : # rmemptydir - remove empty directories # Heiner Steven ([EMAIL PROTECTED]), 2000-07-17 # #

Re: a script to remove empty directories

2004-02-19 Thread Igor Pechtchanski
On Thu, 19 Feb 2004, Andreas Seidl wrote: Bruce Ingalls wrote: Anyhow, here is an elegant, working solution. If no optional dir is passed, then the current dir is checked recursively, and empty subdirectories are passed. #!/bin/bash ROOT=${1:-.} if [ ! -d $ROOT ];then ROOT=.;fi

Re: a script to remove empty directories

2004-02-19 Thread Robert Collins
On Fri, 2004-02-20 at 01:56, Andreas Seidl wrote: Igor Pechtchanski wrote: Feel free to send a patch for this. ;-) Igor I have written the following script, which is as good as I can do at the moment. Oh . I'm sorry, I replied to the wrong thread with my previous email about

Re: a script to remove empty directories

2004-02-19 Thread Robert Collins
On Fri, 2004-02-20 at 01:56, Andreas Seidl wrote: Igor Pechtchanski wrote: Andreas, Feel free to send a patch for this. ;-) Igor I have written the following script, which is as good as I can do at the moment. And is utterly useless. Cygwin setup is written in C/C++. Rob --