diff options
author | Remi Collet <remi@remirepo.net> | 2019-02-25 14:16:45 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-02-25 14:16:45 +0100 |
commit | 46728e63dfa9fada54c3c7b216b5682fd635e463 (patch) | |
tree | c985ee995fec62d60f02d21e06c39ca90a3439d8 | |
parent | db0775f2314fef515ec27250675e8a262ec50637 (diff) |
report new files in modular
-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); } } |