[DRE-commits] [SCM] gem2deb.git branch, master, updated. debian/0.2.3-35-g72c44bc

Antonio Terceiro terceiro at softwarelivre.org
Sun Jun 19 02:35:46 UTC 2011


The following commit has been merged in the master branch:
commit 9ba0be81e71bdecb4109ba8c5dcba931a9e36387
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Sat Jun 18 17:28:25 2011 -0700

    Better Gem2Deb::DhRuby#find_files

diff --git a/lib/gem2deb/dh_ruby.rb b/lib/gem2deb/dh_ruby.rb
index 4594ca1..7dbb15f 100644
--- a/lib/gem2deb/dh_ruby.rb
+++ b/lib/gem2deb/dh_ruby.rb
@@ -299,24 +299,12 @@ module Gem2Deb
         /~$/, /\.(old|bak|BAK|orig|rej)$/, /^_\$/, /\$$/, /\.org$/, /\.in$/, /^\./ ]
 
     def find_files(dir)
-      files = []
-      Dir::chdir(dir) do
-        Find::find('.') do |f|
-          files << f.gsub(/^\.\//, '') # hack hack
+      Dir.chdir(dir) do
+        Dir.glob('**/*').reject do |file|
+          filename = File.basename(file)
+          JUNK_FILES.include?(filename) || HOOK_FILES.include?(filename) || (JUNK_PATTERNS.any? { |junk| filename =~ junk })
         end
       end
-      files = files - ['.'] # hack hack
-      files2 = []
-      files.each do |f|
-        fb = File::basename(f)
-        next if (JUNK_FILES + HOOK_FILES).include?(fb)
-        next if JUNK_PATTERNS.select { |pat| fb =~ pat } != []
-        files2 << f
-      end
-      (files - files2). each do |f|
-        puts "WARNING: excluded file: #{f}"
-      end
-      files2
     end
 
     def install_files(src, list, dest, mode)

-- 
gem2deb.git



More information about the Pkg-ruby-extras-commits mailing list