-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (23 loc) · 733 Bytes
/
Makefile
File metadata and controls
28 lines (23 loc) · 733 Bytes
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
install:
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -q -y \
texlive-full \
lyx \
build-essential \
python3-argcomplete \
ubuntu-make
make_dest_dir:
$(info === Making a directory with the final PDFs if it doesn't exist.)
[ -d pdfs ] || mkdir pdfs
clear_dest_dir:
$(info === Cleaning a directory with the final PDFs.)
rm -f pdfs/*.pdf
make_pdfs:
$(info === Building PDFs.)
FILES=`find lyx_books -name '[a-z-A-Z_-]*.lyx' -print`; \
sudo lyx --export pdf4 $${FILES}
copy_pdfs:
$(info === Copying PDFs into the final directory '$(shell pwd)'.)
FILES=`find lyx_books -name '[a-z-A-Z_-]*.pdf' -print`; \
mv $${FILES} pdfs
all: make_dest_dir clear_dest_dir make_pdfs copy_pdfs