make script
This commit is contained in:
parent
3bc1295ac5
commit
a1cac98f0d
1 changed files with 23 additions and 0 deletions
23
make.py
Executable file
23
make.py
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#! /usr/bin/python3 -B
|
||||||
|
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
PURGE = ["doctrees"]
|
||||||
|
FORMATS = {
|
||||||
|
"html": "html",
|
||||||
|
"xelatexpdf": "latex",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
file = os.path.realpath(__file__)
|
||||||
|
directory = os.path.dirname(file)
|
||||||
|
os.chdir(directory)
|
||||||
|
for build in PURGE + list(FORMATS.values()):
|
||||||
|
try:
|
||||||
|
shutil.rmtree(os.path.join("build", build))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
for make in reversed(sorted(FORMATS.keys())):
|
||||||
|
os.system(" ".join(["make", make]))
|
Loading…
Reference in a new issue