Unset nullglob after counting RPMs

If nullglub sets, seems it will affect the following osc api call
for finding matched projects as like as the error below,

osc api: takes exactly 1 argument (0 given)

thus unset nullglob after counting RPMs.
This commit is contained in:
Max Lin 2015-04-04 21:09:03 +08:00
parent f4439497e9
commit 49a9f7da6a

View File

@ -84,6 +84,7 @@ function sync_prj() {
if [ "$dir" -nt "$dir.solv" ]; then
shopt -s nullglob
rpms=($dir/*.rpm)
shopt -u nullglob
if [ "${#rpms[@]}" -gt 0 ]; then
local start=$SECONDS
rpms2solv "${rpms[@]}" > $dir.solv