Commit 4c701def authored by Michael Shigorin's avatar Michael Shigorin Committed by Anton Midyukov

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.
parent 4a419e6b
......@@ -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 "'"'`' | \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment