Update Makefile
This commit is contained in:
@@ -54,9 +54,9 @@ GREPSTR := " \|(\|)\|^submit\|^analysis\|_cache\|_freeze\|^site_libs\|^www"
|
|||||||
|
|
||||||
all: local upload clean commit push
|
all: local upload clean commit push
|
||||||
|
|
||||||
force: updrefbib check_git_status updvariable render
|
force: updextensions updrefbib check_git_status updvariable render fixtex
|
||||||
|
|
||||||
local: updrefbib check_git_status updvariable lazyrender
|
local: updextensions updrefbib check_git_status updvariable lazyrender fixtex
|
||||||
|
|
||||||
updmakefile:
|
updmakefile:
|
||||||
@if [ "$(OS)" = "OSX" ] && [ "$(HOSTNAME)" = "max" ]; then \
|
@if [ "$(OS)" = "OSX" ] && [ "$(HOSTNAME)" = "max" ]; then \
|
||||||
@@ -91,6 +91,17 @@ updrefbib:
|
|||||||
git commit -m "Update Ref.bib"; \
|
git commit -m "Update Ref.bib"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
updextensions:
|
||||||
|
@if [ ! -d "_extensions/drwater/dwms" ]; then \
|
||||||
|
mkdir -p _extensions && \
|
||||||
|
git clone https://git.drwater.net/quarto/drwater.git _extensions/drwater; \
|
||||||
|
else \
|
||||||
|
cd _extensions/drwater && git pull && cd -; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
check_git_status:
|
check_git_status:
|
||||||
@uncommitted=$$(git status --porcelain); \
|
@uncommitted=$$(git status --porcelain); \
|
||||||
if [ -n "$$uncommitted" ]; then \
|
if [ -n "$$uncommitted" ]; then \
|
||||||
@@ -123,6 +134,19 @@ lazyrender:
|
|||||||
render:
|
render:
|
||||||
@quarto render
|
@quarto render
|
||||||
|
|
||||||
|
fixtex:
|
||||||
|
@if [ -f "MS/SM.tex" ]; then \
|
||||||
|
echo "Fixing longtable formatting in SM.tex..."; \
|
||||||
|
$(SEDI) 's/\\end{longtable\*}/\\bottomrule\\noalign{}\n\\end{longtable*}/g' MS/SM.tex; \
|
||||||
|
echo "Compiling with xelatex..."; \
|
||||||
|
cd MS && xelatex SM.tex; \
|
||||||
|
echo "Moving PDF to www directory..."; \
|
||||||
|
mv SM.pdf ../www/MS/ && cd ..; \
|
||||||
|
echo "TeX fixes applied and document rebuilt."; \
|
||||||
|
else \
|
||||||
|
echo "MS/SM.tex not found. Operation skipped."; \
|
||||||
|
fi
|
||||||
|
|
||||||
commit:
|
commit:
|
||||||
@echo "提交修改(commit)..."; \
|
@echo "提交修改(commit)..."; \
|
||||||
git add .; \
|
git add .; \
|
||||||
|
|||||||
Reference in New Issue
Block a user