summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/cleanemptydirs.py12
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"