|
Lines 424-439
Link Here
|
| 424 |
# quick arg check. |
424 |
# quick arg check. |
| 425 |
local d |
425 |
local d |
| 426 |
for d in "$@"; do |
426 |
for d in "$@"; do |
| 427 |
[ -d "$d" ] || { FileError "$d: not a directory"; rc=1; continue; } |
427 |
[ -d "$d" ] && continue |
|
|
428 |
[ -f "$d" ] || { FileError "$d: not a directory nor regular file"; rc=1; continue; } |
| 429 |
case "$d" in |
| 430 |
*.src.rpm ) continue ;; |
| 431 |
esac |
| 432 |
FileError "$d: regular file but not source RPM"; rc=1; continue |
| 428 |
done |
433 |
done |
| 429 |
[ $rc = 0 ] || return $rc |
434 |
[ $rc = 0 ] || return $rc |
| 430 |
|
435 |
|
| 431 |
init_check || Fatal "init_check failed." |
436 |
init_check || Fatal "init_check failed." |
| 432 |
|
437 |
|
| 433 |
for d in "$@"; do |
438 |
for d in "$@"; do |
| 434 |
[ -d "$d" ] || { FileError "$d: not a directory"; rc=1; continue; } |
439 |
[ -d "$d" -o -f "$d" ] || { FileError "$d: not a directory nor regular file"; rc=1; continue; } |
| 435 |
local f |
440 |
local f |
| 436 |
for f in "$d"/*.rpm; do |
441 |
for f in "$d"/*.rpm; do |
|
|
442 |
[ -f "$d" ] && f="$d" |
| 437 |
if [ ! -f "$f" ]; then |
443 |
if [ ! -f "$f" ]; then |
| 438 |
[ "$f" != "$d/*.rpm" ] || continue |
444 |
[ "$f" != "$d/*.rpm" ] || continue |
| 439 |
FileError "not a regular file" "$f" |
445 |
FileError "not a regular file" "$f" |
|
Lines 601-606
Link Here
|
| 601 |
rc=1 |
607 |
rc=1 |
| 602 |
[ -z "$fast_check" ] || continue |
608 |
[ -z "$fast_check" ] || continue |
| 603 |
fi |
609 |
fi |
|
|
610 |
|
| 611 |
[ "$f" = "$d" ] && break |
| 604 |
done |
612 |
done |
| 605 |
done |
613 |
done |
| 606 |
|
614 |
|