]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - check-unused-files.py
- fix ignoring spec file; don't rm if there is nothing to rm
[packages/rpm-build-tools.git] / check-unused-files.py
index 0ee79a94f15e6e36203f9a633706936600c13e76..4709040c8bbed31fb000cca984290882745c5e2e 100644 (file)
@@ -35,14 +35,15 @@ obsolete = []
 
 for file in os.listdir(dir):
     file = os.path.basename(file)
-    if file in [ '.', '..', 'CVS', '.cvsignore', 'dropin', 'md5', 'adapter', 'builder', 'relup.sh', 'compile.sh', 'repackage.sh', spec ]:
+    if file in [ '.', '..', 'CVS', '.cvsignore', 'dropin', 'md5', 'adapter', 'builder', 'relup.sh', 'compile.sh', 'repackage.sh', os.path.basename(spec) ]:
         continue
     if file not in files:
         print "Obsolete file: %s" % file
         obsolete.append(file)
 
-print
-print "cvs rm -f %s" % " ".join(obsolete)
+if obsolete:
+    print
+    print "cvs rm -f %s" % " ".join(obsolete)
 
 
 
This page took 0.028629 seconds and 4 git commands to generate.