Commit a934bc32 authored by Sergey Goncharov's avatar Sergey Goncharov
Browse files

improving make pack

parent 6bd0fbef
Pipeline #14645 passed with stage
in 31 seconds
......@@ -157,12 +157,21 @@ pack: $(TEXSRC)
make cleanall
$(MAKE) pdf
mkdir -p submission
# purging old files if any
rm -Rf submission/*
cp $(THISDIR)*.tex $(THISDIR)*.sty $(THISDIR)*.cls submission
-cp *.bib *.bbl *.bst submission
# copying all files from TexCommon mentioned in log-file
for file in $(THISDIR)/*; do \
if grep --quiet $(shell basename $(THISDIR))/$$(basename $$file) *.log; \
then cp -v $$file submission; \
fi; done
cp *.bib *.bbl *.bst submission
# copying all files from the current directory mentioned in log-file
for file in *; do if grep --quiet $$file *.log; then cp $$file submission; fi; done
# remove comments
for file in submission/*.tex; do perl -i -pe 's/(^|[^\\])%.*/\1%/' $$file; done
cd submission; zip -r ../submission.zip *
# remove appendix
for file in submission/*.tex; do sed -i '/\\appendix/,$$c \\\end{document}' $$file ; done
cd submission; rm *.aux *.blg *.log *.out; rm -f ../submission.zip; zip -r ../submission.zip *
.PHONY: up
up: $(PDFNAMES)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment