[FE training-materials-updates] Set authors for each .tex file
Alexandre Belloni
alexandre.belloni at free-electrons.com
Fri Mar 22 18:02:47 CET 2013
Repository : git://git.free-electrons.com/training-materials.git
On branch : authors
Link : http://git.free-electrons.com/training-materials/commit/?id=eb6a022ac1c25867b1d2b2bb73474f6fb707941e
>---------------------------------------------------------------
commit eb6a022ac1c25867b1d2b2bb73474f6fb707941e
Author: Alexandre Belloni <alexandre.belloni at free-electrons.com>
Date: Fri Mar 22 17:59:21 2013 +0100
Set authors for each .tex file
main issue is that every .tex file is not using \titleframe so some
people doesn't appear in the title...
Signed-off-by: Alexandre Belloni <alexandre.belloni at free-electrons.com>
>---------------------------------------------------------------
eb6a022ac1c25867b1d2b2bb73474f6fb707941e
Makefile | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 3e7bfb2..8fd85b6 100644
--- a/Makefile
+++ b/Makefile
@@ -335,19 +335,21 @@ SLIDES_TEX = \
$(SLIDES_COMMON_AFTER)
SLIDES_PICTURES = $(call PICTURES,$(foreach s,$(SLIDES_CHAPTERS),slides/$(s))) $(COMMON_PICTURES)
-SLIDES_FOLDER = \
+SLIDES_FOLDERS = \
$(foreach s,$(SLIDES_CHAPTERS),$(wildcard slides/$(s))) \
%-slides.pdf: $(VARS) $(SLIDES_TEX) $(SLIDES_PICTURES) $(STYLESHEET)
@echo $(SLIDES_CHAPTERS_NUM)
@mkdir -p $(OUTDIR)
# generate a list of authors, based on git commits
- rm -f $(OUTDIR)/authors.log
- for d in $(SLIDES_FOLDER) ; do \
- git log --format='%aN' $$d >> $(OUTDIR)/authors.log; \
+ rm -rf $(OUTDIR)/authors
+ @mkdir -p $(OUTDIR)/authors
+ for d in $(SLIDES_FOLDERS) ; do \
+ echo -n "\authors{" > $(OUTDIR)/authors/$$(basename $$d).tex; \
+ git log --format='%aN' $$d | tee -a $(OUTDIR)/authors/all.log | sort -u -f | sed -e 's/$$/,/' | xargs echo | sed -e 's/,$$/}/' >> $(OUTDIR)/authors/$$(basename $$d).tex; \
done
echo -n "\authors{" > $(OUTDIR)/authors.tex
- sort -u -f $(OUTDIR)/authors.log | sed -e 's/$$/,/' | xargs echo | sed -e 's/,$$/}/' >> $(OUTDIR)/authors.tex
+ sort -u -f $(OUTDIR)/authors/all.log | sed -e 's/$$/,/' | xargs echo | sed -e 's/,$$/}/' >> $(OUTDIR)/authors.tex
# We generate a .tex file with \input{} directives (instead of just
# concatenating all files) so that when there is an error, we are
# pointed at the right original file and the right line in that file.
@@ -357,7 +359,14 @@ SLIDES_FOLDER = \
echo -n "\input{../" >> $(OUTDIR)/$(basename $@).tex ; \
echo -n $$f | sed 's%\.tex%%' >> $(OUTDIR)/$(basename $@).tex ; \
echo "}" >> $(OUTDIR)/$(basename $@).tex ; \
- done
+ echo $${f:0:6}; \
+ if [ $${f:0:6} = "slides" ]; then \
+ echo -n "\input{authors/" >> $(OUTDIR)/$(basename $@).tex ; \
+ echo -n $$(basename $$f) | sed 's%\.tex%%' >> $(OUTDIR)/$(basename $@).tex ; \
+ echo "}" >> $(OUTDIR)/$(basename $@).tex ; \
+ fi ; \
+ done ;\
+ read
(cd $(OUTDIR); $(PDFLATEX_ENV) $(PDFLATEX) $(PDFLATEX_OPT) $(basename $@).tex)
# The second call to pdflatex is to be sure that we have a correct table of
# content and index
More information about the training-materials-updates
mailing list