compatibility with alpine

This commit is contained in:
/dev/urandom 2020-06-05 11:49:29 +03:00
parent dc66777a0f
commit 02a3376c5c
3 changed files with 9 additions and 5 deletions

View file

@ -1,10 +1,14 @@
-include Makefile.pwd
-include Makefile.cfg
OUTDIR=out
PAGEDIR=pages
SRCDIR=src
TPLDIR=tpl
ifndef THEME
THEME=theme
endif
_PNGS = $(shell find $(PAGEDIR) -name \*.png)
PNGS = $(patsubst $(PAGEDIR)/%,$(OUTDIR)/%,$(_PNGS))
@ -30,11 +34,11 @@ upload:
$(OUTDIR)/blog/index.html: $(_BLOG_PAGES) $(TPLDIR)/blog_header.md $(TPLDIR)/blog_footer.md $(TPLDIR)/default.tpl
@mkdir -p $(@D)
./blogindex.sh | theme -C style -t $(TPLDIR)/default.tpl -p blog/index.html -o $@
./blogindex.sh | $(THEME) -C style -t $(TPLDIR)/default.tpl -p blog/index.html -o $@
$(OUTDIR)/%.html: $(PAGEDIR)/%.md $(TPLDIR)/default.tpl
@mkdir -p $(@D)
theme -C style -t $(TPLDIR)/default.tpl -p $(patsubst $(OUTDIR)/%,%,$@) -o $@ $<
$(THEME) -C style -t $(TPLDIR)/default.tpl -p $(patsubst $(OUTDIR)/%,%,$@) -o $@ $<
$(OUTDIR)/%: static/%.h
@mkdir -p $(@D)

View file

@ -7,7 +7,7 @@ if [[ -z $LASTUPLOAD ]]; then LASTUPLOAD=0; fi
#echo "Last upload at $LASTUPLOAD"
FILES=`ls $DIRECTORY/*.md -1ct --time=birth`
FILES=`ls $DIRECTORY/*.md -1ct`
cat tpl/blog_header.md

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
if ! [[ -f upload.pwd ]]; then
echo "You need a file named upload.pwd with the following format:"