forked from varia/varia.website
Replace makefile with python
This commit is contained in:
parent
24e7a1f9f4
commit
88444f13c7
7
Makefile
7
Makefile
@ -1,7 +0,0 @@
|
||||
SITES ?= $$(find . -maxdepth 2 -name "Makefile" -not -path "./Makefile" | xargs -I {} dirname {})
|
||||
|
||||
default: publish
|
||||
|
||||
.PHONY: publish
|
||||
publish:
|
||||
for path in $(SITES) ; do echo "Building in $(basename $$path)..." && cd $$path && make publish; done
|
17
publish
Executable file
17
publish
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import subprocess
|
||||
|
||||
paths = [p for p in os.listdir('.') if os.path.isdir(p) and 'Makefile' in os.listdir(p)]
|
||||
|
||||
for path in paths:
|
||||
print("-------------------------------------------------------------------")
|
||||
print("-------------------------------------------------------------------")
|
||||
print("-------------------------------------------------------------------")
|
||||
print("Building in {0}".format(path))
|
||||
subprocess.run("cd {} && make html".format(path), shell=True)
|
||||
print("-------------------------------------------------------------------")
|
||||
print("-------------------------------------------------------------------")
|
||||
print("-------------------------------------------------------------------")
|
Loading…
Reference in New Issue
Block a user