reports.mk: added "contents" one

"Provide iso contents file" has been a long-standing
feature request regarding both starterkits and distros
proper; release managers used to compensate this with
their own scripts.

Suggested-by: sem@, legion@ and someone else too
This commit is contained in:
Michael Shigorin 2018-06-11 11:15:49 +03:00
parent c62416112d
commit 9cc9d88143

View File

@ -17,7 +17,7 @@ ifneq (1,$(NUM_TARGETS))
SHORTEN := >/dev/null SHORTEN := >/dev/null
endif endif
all: reports/targets reports/scripts reports/cleanlog all: reports/targets reports/scripts reports/cleanlog reports/contents
@if [ -n "$(IMAGE_OUTPATH)" ]; then \ @if [ -n "$(IMAGE_OUTPATH)" ]; then \
cp -a "$(REPORTDIR)" "$(LOGDIR)/$(IMAGE_OUTFILE).reports"; \ cp -a "$(REPORTDIR)" "$(LOGDIR)/$(IMAGE_OUTFILE).reports"; \
fi fi
@ -79,6 +79,18 @@ reports/targets: reports/prep
fi $(SHORTEN); \ fi $(SHORTEN); \
mv "$(REPORT_PATH)" "$(REPORTDIR)/$(@F).log" mv "$(REPORT_PATH)" "$(REPORTDIR)/$(@F).log"
reports/contents: reports/prep
@case $(IMAGE_OUTFILE) in \
*.iso) \
if type -t isoinfo >&/dev/null; then \
OUT="$(REPORTDIR)/$(@F).txt"; \
isoinfo -f -R -i $(IMAGE_OUTPATH) > $$OUT && \
echo "** contents list: $$OUT" $(SHORTEN); \
else \
echo "reports.mk: missing isoinfo" >&2; \
fi; \
esac
else else
all:; @: all:; @:
endif endif