aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2018-09-30 08:18:58 +0200
committerRobert Alessi <alessi@robertalessi.net>2018-09-30 08:18:58 +0200
commita5f9622898b3a296858ec78a5321fe12d9e76f38 (patch)
tree42cba6d185750df0f3494f11367deaeb745895bd
parent589e08742446243a14c2cec8db4a0d036b8df288 (diff)
downloadcourses-a5f9622898b3a296858ec78a5321fe12d9e76f38.tar.gz
improved makefile
-rw-r--r--makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/makefile b/makefile
index 435f88f..eba7b62 100644
--- a/makefile
+++ b/makefile
@@ -1,3 +1,6 @@
1exts := md png sh bib tex
2findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)")
3
1all: pdf 4all: pdf
2 5
3pdf: clean 6pdf: clean
@@ -12,7 +15,7 @@ pdf: clean
12clean: 15clean:
13 rm -rf .backup 16 rm -rf .backup
14 find -iname "*~" | xargs rm -rf 17 find -iname "*~" | xargs rm -rf
15 find ./* -type f | grep 'makefile\|\.md$$\|\.png$$\|\.sh$$\|\.bib$$\|\.tex$$' > ls-R 18 find ./* -type f -iname "makefile" $(findopts) > ls-R
16 rsync -avPr --files-from=ls-R . .backup 19 rsync -avPr --files-from=ls-R . .backup
17 rm -rf * 20 rm -rf *
18 cp -p -r .backup/* . 21 cp -p -r .backup/* .