Compare commits

..

No commits in common. "5d46c95808f160b07ae683acf088d3e991cd790d" and "2e1ebf748297e503317d14d0ae9127548e256112" have entirely different histories.

3 changed files with 18 additions and 25 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
_build _build
*.*# *.*#
brightspace/

View File

@ -1 +1,2 @@
_build _build
brightspace/

View File

@ -1,44 +1,35 @@
# Written by joe # Written by joe
# Revision da9d81f2
# Variables
REVISION := "$(shell git describe --abbrev=8 --dirty --always --tags)" REVISION := "$(shell git describe --abbrev=8 --dirty --always --tags)"
# Paths
ROOT := "$(PWD)"
BUILDDIR := $(ROOT)/_build
SUBMITDIR := $(BUILDDIR)/Brightspace
all: pdf submit all: pdf submit
# Move everything required to builddir # Move all files to the build dir
copy: copy:
mkdir -p $(BUILDDIR) mkdir -p _build
find -type f '(' -name "*.tex*" -o -name "*.sty*" -o -name "*.bib" ')' -exec cp {} $(BUILDDIR) \; find -type f '(' -name "*.tex*" -o -name "*.sty*" -o -name "*.bib" ')' -exec cp {} _build \;
# Build source in buildir into pdf
pdf: copy pdf: copy
cd $(BUILDDIR) && find . -name '*.tex' -exec latexmk --shell-escape -pdf {} \; cd _build && find . -name '*.tex' -exec latexmk --shell-escape -pdf {} \;
# Package everything into a neat little zip + pdf
submit: pdf submit: pdf
rm -rvf $(SUBMITDIR) rm -rvf brightspace
mkdir -p $(SUBMITDIR) mkdir -p brightspace
find -type f '(' -name "*.tex*" -o -name "*.sty*" -o -name "*.bib" ')' -exec cp {} $(SUBMITDIR) \; find -type f '(' -name "*.tex*" -o -name "*.sty*" -o -name "*.bib" ')' -exec cp {} brightspace \;
cd $(SUBMITDIR) && zip $(REVISION)_source.zip * cd brightspace && zip $(REVISION)_source.zip *
cp $(BUILDDIR)/*.pdf $(SUBMITDIR) cp _build/*.pdf brightspace
echo "Auto generated using software written by Joe." > $(SUBMITDIR)/README.md echo "Auto generated using software written by Joe." > brightspace/README.md
echo "This build and all artifacts were built locally on this date: " >> $(SUBMITDIR)/README.md echo "This build and all artifacts were built locally on this date: " >> brightspace/README.md
date >> $(SUBMITDIR)/README.md date >> brightspace/README.md
# cleanup # cleanup
cd $(SUBMITDIR) && find -type f '(' -name "*.tex*" -o -name "*.sty*" -o -name "*.bib" ')' -exec rm {} \; cd brightspace && find -type f '(' -name "*.tex*" -o -name "*.sty*" -o -name "*.bib" ')' -exec rm {} \;
# Clean all
clean: clean:
git clean -fdX git clean -fdX
rm -rvf $(SUBMITDIR) rm -rvf brightspace