diff options
-rw-r--r-- | makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,3 +1,6 @@ | |||
1 | exts := md png sh bib tex | ||
2 | findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") | ||
3 | |||
1 | all: pdf | 4 | all: pdf |
2 | 5 | ||
3 | pdf: clean | 6 | pdf: clean |
@@ -12,7 +15,7 @@ pdf: clean | |||
12 | clean: | 15 | clean: |
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/* . |