rtfd/make.py

24 lines
506 B
Python
Raw Normal View History

2017-12-02 21:40:39 +00:00
#! /usr/bin/python3 -B
import os
import shutil
PURGE = ["doctrees"]
FORMATS = {
"html": "html",
2017-12-12 23:52:34 +00:00
# "xelatexpdf": "latex",
2017-12-02 21:40:39 +00:00
}
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]))