-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
\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
\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
\begin{frame}[fragile]
\begin{lstlisting}
frobnicator@frobmachine:~/projects/myfirstproject\$ git add frobbedfile
+
frobnicator@frobmachine:~/projects/myfirstproject\$ git status
On branch master
(use "git rm --cached <file>..." to unstage)
new file: frobbedfile
+
frobnicator@frobmachine:~/projects/myfirstproject\$ git commit
[master (root-commit) 2b7355e] Adds frobbedfile
1 file changed, 1 insertion(+)