2021-04-19 13:37:50 +02:00
|
|
|
OUTPUT_DIR=./output
|
2022-10-15 16:32:58 +02:00
|
|
|
WEB_ROOT=/var/www/themusicinnoise.net/main
|
2020-11-14 14:27:59 +01:00
|
|
|
|
2022-10-15 16:33:21 +02:00
|
|
|
.PHONY: all pages blog clean install
|
2021-04-19 13:37:50 +02:00
|
|
|
|
|
|
|
all: pages blog
|
2022-09-05 14:15:40 +02:00
|
|
|
cp -r static/* $(OUTPUT_DIR)
|
2020-11-12 10:08:48 +01:00
|
|
|
|
|
|
|
pages:
|
2020-11-14 14:27:59 +01:00
|
|
|
mkdir -p $(OUTPUT_DIR)
|
|
|
|
find pages -type f -name '*.cfg' -print0 | sort -zr | xargs -0 saait -o $(OUTPUT_DIR)/
|
2020-11-12 10:08:48 +01:00
|
|
|
|
|
|
|
blog:
|
2020-11-14 14:27:59 +01:00
|
|
|
mkdir -p $(OUTPUT_DIR)/blog
|
2021-11-16 20:27:33 +01:00
|
|
|
cat templates/page/header.html blog/templates/index.html/header-part.html > blog/templates/index.html/header.html
|
2022-02-17 20:40:22 +01:00
|
|
|
sed -i -e 's/\$${title}/Blog/' blog/templates/index.html/header.html
|
2021-11-16 20:27:33 +01:00
|
|
|
cat blog/templates/index.html/footer-part.html templates/page/footer.html > blog/templates/index.html/footer.html
|
2020-11-14 14:27:59 +01:00
|
|
|
find blog/posts -type f -name '*.cfg' -print0 | sort -zr | xargs -0 saait -o $(OUTPUT_DIR)/blog/ -t blog/templates/
|
2020-11-12 10:08:48 +01:00
|
|
|
|
|
|
|
clean:
|
2020-11-14 14:27:59 +01:00
|
|
|
rm -rf $(OUTPUT_DIR)
|
2021-11-16 20:27:33 +01:00
|
|
|
rm -f blog/templates/index.html/header.html
|
|
|
|
rm -f blog/templates/index.html/footer.html
|
2022-10-15 16:32:58 +02:00
|
|
|
|
|
|
|
install: all
|
2022-11-26 17:33:18 +00:00
|
|
|
mkdir -p $(WEB_ROOT)
|
2022-10-15 16:32:58 +02:00
|
|
|
cp -r $(OUTPUT_DIR)/* $(WEB_ROOT)/
|