diff options
Diffstat (limited to 'mkmodular')
-rwxr-xr-x | mkmodular | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -181,6 +181,7 @@ data: EOT; function findPackages($from, $dest, $pat) { + global $oldrpms; $fil = '.'; $rpms = []; foreach (glob("$from/$pat") as $file) { @@ -188,10 +189,14 @@ function findPackages($from, $dest, $pat) { $name = basename($file); if (!file_exists("$dest/$name")) { if (link($file, "$dest/$name")) { - echo $fil; - if (count($rpms)%64==63) { - echo "\r"; - $fil = ($fil == '.' ? '-' : '.'); + if (in_array(basename($file), $oldrpms)) { + echo $fil; + if (count($rpms)%64==63) { + echo "\r"; + $fil = ($fil == '.' ? '-' : '.'); + } + } else { + printf("\r+ %-70s\n", basename($file)); } } } @@ -226,8 +231,12 @@ function genModule($srce, $dest, $pat, $ver, $arch, $deps, $template) { } function cleanup($dest) { + global $oldrpms; + + $oldrpms = array(); foreach (glob("$dest/*rpm") as $file) { unlink($file); + $oldrpms[] = basename($file); } } |