aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
Diffstat (limited to 'iurt2')
-rwxr-xr-xiurt216
1 files changed, 12 insertions, 4 deletions
diff --git a/iurt2 b/iurt2
index ded2875..d5614a5 100755
--- a/iurt2
+++ b/iurt2
@@ -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 ]