dev 2.1.39 → 2.1.40
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/base/dir.rb +15 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e928cd3c5e2f47232a2c0f573e17a339ad204090
|
4
|
+
data.tar.gz: d22a8902b98b6857dda570c51aa9da3f3d10ed08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a788a0b4f8761aa75a5d75a2e641dce37bb01a2698527f777ef62360ad34d230aa88e928a089eeeb69ab432c9572e64a93fddd5b50938c01488cd595ace45676
|
7
|
+
data.tar.gz: 0802441762be6aa90250d60bbd3815a7e1ceb93dbe67979682ac6ba42c205747ab96acb0db08a231036286ace294aabbed352282728a1460f79ec26deff1149b
|
data/lib/base/dir.rb
CHANGED
@@ -79,18 +79,21 @@ def self.copy_files(src_dir,glob_pattern,exclude_patterns,target_dir)
|
|
79
79
|
if(Dir.exists?(src_dir))
|
80
80
|
Dir.chdir(src_dir) do
|
81
81
|
Dir.glob(glob_pattern).each{|f|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
82
|
+
if(File.file?(f))
|
83
|
+
exclude = false
|
84
|
+
if(!exclude_patterns.nil?)
|
85
|
+
exclude_patterns.each{|p|
|
86
|
+
exclude = true if(f.include?(p))
|
87
|
+
}
|
88
|
+
end
|
89
|
+
if(!exclude)
|
90
|
+
dest = "#{target_dir}/#{f}"
|
91
|
+
FileUtils.mkdir_p(File.dirname(dest)) if(!Dir.exists?(File.dirname(dest)))
|
92
|
+
FileUtils.cp(f,dest)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
}
|
96
|
+
|
94
97
|
end
|
95
98
|
end
|
96
99
|
end
|