From 46728e63dfa9fada54c3c7b216b5682fd635e463 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 25 Feb 2019 14:16:45 +0100 Subject: report new files in modular --- mkmodular | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'mkmodular') diff --git a/mkmodular b/mkmodular index ffd3ff98..08e2cfa4 100755 --- a/mkmodular +++ b/mkmodular @@ -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); } } -- cgit