>From 5eca87b3314d00a11009a5b5f3b57e1a17dec949 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Wed, 28 Apr 2021 14:50:06 +0300 Subject: [PATCH 2/3] reports.mk: streamline basedir(1) equivalent That "clever hack" with two rev(1) invocations seems pretty stupid to me: too much processes and processing instead of simple prefix removal. One can also have that as ${var##*/} when dealing with a shell variable and avoiding extra forks, BTW. --- reports.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reports.mk b/reports.mk index 0e44c4471..7b81e785a 100644 --- a/reports.mk +++ b/reports.mk @@ -79,8 +79,7 @@ reports/contents: reports/prep reports/packages: reports/prep @grep -E 'chroot/.in/[^/]*.rpm' < $(BUILDLOG) | \ - cut -d' ' -f 1 | tr -d "'"'`' | \ - rev | cut -d'/' -f 1 | rev | \ + cut -d' ' -f 1 | tr -d "'"'`' | sed 's,^.*/,,' | \ sort -u > "$(REPORTDIR)/list-rpms.txt" @grep -E 'chroot/.in/[^/]*.rpm' < $(BUILDLOG) | \ cut -d' ' -f 1 | tr -d "'"'`' | \ -- 2.25.4