diff options
author | 2007-07-07 17:54:00 +0000 | |
---|---|---|
committer | 2007-07-07 17:54:00 +0000 | |
commit | ad2a1716f80403428eefdc32403a7db227705556 (patch) | |
tree | 9056f8977407fd0b2a7d017ebe2f0e958d8c343d /scripts | |
parent | prune empty dirs and get rid of digests (diff) | |
download | sunrise-reviewed-ad2a1716f80403428eefdc32403a7db227705556.tar.gz sunrise-reviewed-ad2a1716f80403428eefdc32403a7db227705556.tar.bz2 sunrise-reviewed-ad2a1716f80403428eefdc32403a7db227705556.zip |
add nice lil script to find empty dirs in sunrise
svn path=/sunrise/; revision=4189
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/cleanemptydirs.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/cleanemptydirs.py b/scripts/cleanemptydirs.py new file mode 100755 index 000000000..9ae1e0667 --- /dev/null +++ b/scripts/cleanemptydirs.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +"""find empty dirs""" + +import os +from os.path import join, getsize +for root, dirs, files in os.walk('.'): + for ignoredir in ('CVS','.svn','xfce-base','xfce-extra','eclass'): + if ignoredir in dirs: + dirs.remove(ignoredir) + if len(dirs)+len(files) == 0: + print root, "seems to be empty" |