Introduction
Introduction Statistics Contact Development Disclaimer Help
tMakefile: clean up output directory and put gopher contents into separate dir …
git clone git://src.adamsgaard.dk/adamsgaard.dk
Log
Files
Refs
README
LICENSE
---
commit dc3364290fcb607b6c1c43e2ad0db9417bc3f674
parent 1adde9aa1c1fe4a1f6bffdecdc14e2992c406cfc
Author: Anders Damsgaard <[email protected]>
Date: Wed, 9 Dec 2020 11:59:05 +0100
Makefile: clean up output directory and put gopher contents into separate dir
Diffstat:
M Makefile | 27 +++++++++++----------------
1 file changed, 11 insertions(+), 16 deletions(-)
---
diff --git a/Makefile b/Makefile
t@@ -1,31 +1,28 @@
default: generate
output = output/
+gopheroutput = gopheroutput/
generate:
mkdir -p $(output)
saait `ls -1r pages/*.cfg`
+ cp style.css print.css $(output)/
+ mkdir -p $(gopheroutput)
for f in pages/[0-9][0-9][0-9]*.txt; do \
title="$$(sed -n 's/^title.*=//p' "$${f%%.txt}.cfg" | tr a-z A…
out="$$(printf '%s' "$$f" | sed 's/[0-9][0-9][0-9]-//')"; \
- out="$(output)$${out##pages}"; \
- echo $$out; \
+ out="$(gopheroutput)$${out##pages}"; \
printf '# %s \n\n' "$$title" > "$$out"; \
cat "$$f" >> "$$out"; \
done
- sed -i 's,|\([A-z0-9-]*\)\.html|server|port,|/\1.txt|server|port,' $(o…
+ sed 's,|\([A-z0-9-]*\)\.html|server|port,|/\1.txt|server|port,' \
+ $(output)/index.gph > $(gopheroutput)/index.gph
sed 's,https://adamsgaard.dk,gopher://adamsgaard.dk/0,g; \
s,text/html,text,g; \
s,\.html,\.txt,g' \
- $(output)/atom.xml > $(output)/atom-gopher.xml;
- cp style.css print.css $(output)/
- rsync -ra \
- $(output)/ \
- pages/*.txt \
- /var/gopher/
- rsync -ra \
- $(output)/atom-gopher.xml \
- /var/gopher/atom.xml
+ $(output)/atom.xml > $(gopheroutput)/atom.xml;
+ mv $(output)/*.gph $(gopheroutput)/
+ rsync -a $(gopheroutput)/ /var/gopher/
view:
$(BROWSER) $(output)/index.html
t@@ -41,14 +38,12 @@ deploy: generate
papers video img $(output)/ \
adamsgaard.dk:/var/www/domains/adamsgaard.dk/
rsync -av --progress \
- $(output)/ \
+ $(gopheroutput)/ \
pages/*.txt \
adamsgaard.dk:/var/gopher/
- rsync -av
- $(output)/atom-gopher.xml \
- adamsgaard.dk:/var/gopher/atom.xml
clean:
rm -rf $(output)/
+ rm -rf $(gopheroutput)/
.PHONY: default generate view deploy
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.