1
0
Fork 0

add upload to makefile

This commit is contained in:
Rhiannon Morris 2020-06-30 19:34:20 +02:00
parent 7bbc6d1481
commit a053815729
1 changed files with 9 additions and 1 deletions

View File

@ -6,11 +6,19 @@ IMAGES = mlem.gif icon.png
BUILDDIR ?= _build
TMPDIR ?= _tmp
HOST ?= yummy.cricket
REMOTE_USER ?= www-data
IDFILE ?= ~/.ssh/xyz
REMOTE_DIR ?= yummy
all: build
build: $(patsubst %,$(BUILDDIR)/%,$(FONTS) $(CSS) $(PAGES) $(IMAGES))
upload: build
@rsync -rPLzh --delete -e 'ssh -l $(REMOTE_USER) -i $(IDFILE)' \
$(BUILDDIR)/ $(HOST):$(REMOTE_DIR)/
$(BUILDDIR)/%: %
@echo $*
@mkdir -p $(dir $@)
@ -26,4 +34,4 @@ $(BUILDDIR)/%.gif: %_bg.gif
clean:
$(RM) -r $(TMPDIR) $(BUILDDIR)
.PHONY: clean all build
.PHONY: clean all build upload