diff options
Diffstat (limited to 'iurt2')
-rwxr-xr-x | iurt2 | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -177,15 +177,23 @@ $run{todo} = [ ]; $run{rebuild} = 1; $run{distro} = shift @_; $run{my_arch} = shift @_; + foreach (@_) { my ($path, $srpm); - if (m,(.*/)([^/]*.src.rpm)$, && -f $_) { - ($path, $srpm) = ( $1, $2 ) - } elsif (m,([^/]*.src.rpm)$, && -f $_) { - ($path, $srpm) = ( './', $1 ) + + unless (-f $_ && -r $_) { + die "FATAL $program_name: $_ not a file or cannot be read\n" + } + + if (m,(.*/)([^/]*\.src\.rpm)$,) { + ($path, $srpm) = ($1, $2); + } elsif (m,([^/]*\.src\.rpm)$,) { + ($path, $srpm) = (`pwd`, $1); + chomp($path); } else { die "FATAL $program_name: $_ does not seems to be a SRPM\n" } + if (check_arch($_, $run{my_arch})) { plog("force build for $2 (from $1)"); push @{$run{todo}}, [ $path, $srpm, 1 ] |