# - get the real packaging dir if it's a symbol link
# - collect all spec files to @pre_packs
#---------------------------------------------------------------------
+my @spec_lists;
+sub spec_wanted{
+ if($arg_spec ne ""){
+ if(-f $File::Find::name){
+ if($File::Find::name =~ /$arg_spec/){
+ push(@spec_lists,$File::Find::name);
+ }
+ }
+ }
+ else
+ {
+ if(-f $File::Find::name){
+ if($File::Find::name =~ /\.spec$/){
+ push(@spec_lists,$File::Find::name);
+ }
+ }
+ }
+}
sub fill_packs_from_git {
my $name = shift;
my $base = dirname($name);
}
} else {
# specify --include-all use current packaging dir not from git
- my $pattern = "$base/$l_packaging_dir/*.spec";
- $pattern = "$base/$l_packaging_dir/$arg_spec" if $arg_spec ne "";
- my @spec_list = glob($pattern);
+ #my $pattern = "$base/$l_packaging_dir/*.spec";
+ #$pattern = "$base/$l_packaging_dir/$arg_spec" if $arg_spec ne "";
+ #my @spec_list = glob($pattern);
+ my $f_path="$base/$l_packaging_dir";
+ File::Find::find({wanted => \&spec_wanted},$f_path);
my $specs = "";
- foreach my $spec (@spec_list) {
+ foreach my $spec (@spec_lists) {
$specs = $specs . $spec . ",";
}
if ($specs ne "") {