From ce79438f2a77925e9e0bf3422d9fcdfe8ed906b5 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Wed, 1 Apr 2015 10:56:57 +0200 Subject: [PATCH] Clean makefile and better shellcode Makefile now has 1 target for all images Shell listings have additional newlines for readability --- Makefile | 22 ++++++++++------------ git.tex | 4 ++++ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index bd86817..fcf83c7 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,25 @@ -SHELL:=/bin/bash TEX:=pdflatex -.PHONY: clean clobber +.PHONY: clean clobber images -git.pdf: git.tex preamble.fmt 1.png 2.png - $(TEX) $< +git.pdf: git.tex preamble.fmt images $(TEX) $< + grep -q "rerunfilecheck Warning:.*$(basename $<).out" $(basename $<).log &&\ + $(TEX) $< preamble.fmt: preamble.tex vc.tex - $(TEX) -ini -jobname="$(basename $<)" "&$(TEX) $<\dump" + $(TEX) -ini -jobname="$(basename $@)" "&$(TEX) $<\dump" -1.png: +images: wget -qO- http://www.androidworld.it/wp-content/uploads/2014/02/linus-torvalds-getty-final.jpg\ - | convert -resize 10\% - $@ - -2.png: - wget -qO$@ http://blog.osteele.com/images/2008/git-transport.png + | convert -resize 10\% - - > 1.png + wget -qO2.png http://blog.osteele.com/images/2008/git-transport.png vc.tex: .git/logs/HEAD git log -1 --format="format:\\gdef\\GITAbrHash{%H}" > $@ clean: - $(RM) -v *.{vrb,eps,aux,fmt,bbl,blg,dvi,log,out,toc,nav,snm} vc.tex + $(RM) -v $(addprefix *.,vrb eps aux fmt bbl blg dvi log out toc nav snm) vc.tex clobber: clean - $(RM) -v *.{png,pdf} + $(RM) -v *.pdf 1.png diff --git a/git.tex b/git.tex index eef261c..4269738 100644 --- a/git.tex +++ b/git.tex @@ -103,6 +103,7 @@ git version 1.7.10.4 \begin{lstlisting} frobnicator@frobmachine:~/projects\$ git init myfirstproject Initialized empty Git repository in /home/frobnicator/projects/myfirstproject/.git/ + frobnicator@frobmachine:~/projects\$ ls -1 myfirstproject/.git branches/ config @@ -141,6 +142,7 @@ refs/ \frametitle{Add and commit} \begin{lstlisting} frobnicator@frobmachine:~/projects/myfirstproject\$ echo "This is a frobfile" > frobbedfile + frobnicator@frobmachine:~/projects/myfirstproject\$ git status On branch master @@ -158,6 +160,7 @@ nothing added to commit but untracked files present (use "git add" to track) \begin{frame}[fragile] \begin{lstlisting} frobnicator@frobmachine:~/projects/myfirstproject\$ git add frobbedfile + frobnicator@frobmachine:~/projects/myfirstproject\$ git status On branch master @@ -167,6 +170,7 @@ Changes to be committed: (use "git rm --cached ..." to unstage) new file: frobbedfile + frobnicator@frobmachine:~/projects/myfirstproject\$ git commit [master (root-commit) 2b7355e] Adds frobbedfile 1 file changed, 1 insertion(+) -- 2.20.1