forked from tkrajina/uvod-u-git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
35 lines (30 loc) · 834 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
pdf_pages=$(shell pdfinfo "git.pdf" | grep "Pages" | sed -e "s/[^0-9]*//")
build: init
git log -1 --format=\\verb+%H+ > current_commit.tex
mkdir -p graphs
mkdir -p git_output
python create_graphs.py
python create_git_outputs.py
# 2 puta da bi sadržaj bio ažuran:
pdflatex git.tex
pdflatex git.tex
echo "git.pdf created"
init:
# Za svaki slučaj, ako submodul nije inicijaliziran:
git submodule init
git submodule update
clean:
rm -f *.dvi *.log *.aux *.swp *.swo *.toc *.idx *.pdf
rm -f graphs/*
show: build
evince git.pdf &
random-page: build
evince -p `python -c "import random as r;print r.randint(1,$(pdf_pages))"` git.pdf &
github-page: build
cp git.pdf /tmp
git checkout gh-pages
cp /tmp/git.pdf .
git add git.pdf
git commit --amend -m "git.pdf"
git push -f origin gh-pages
git checkout master