web/Makefile

35 lines
1.5 KiB
Makefile

all: static/index.html
all: static/webflow-assets/650a2b4cc0091d7b7c21adaa/65137e999ce90eda6bc2c5f1_placeholder_background.jpg
all: static/webflow-assets/650a2b4cc0091d7b7c21adaa/65139fa5e0b8553d4c913fe5_logo_horizontal_2.svg
all: static/webflow-assets/650a2b4cc0091d7b7c21adaa/6515ffbd1e90dc6f533c7a85_umorpha_favcon.jpg
all: static/webflow-assets/650a2b4cc0091d7b7c21adaa/css/umorpha.webflow.a8989709b.min.css
all: static/webflow-assets/650a2b4cc0091d7b7c21adaa/js/webflow.fbf9e890f.js
all: static/webflow-assets/img/webclip.png
all: static/webflow-uploads/650a2b4cc0091d7b7c21adaa/650a2db03a157b2c46cdd565_Futura-Std-Medium.ttf
.PHONY: all
mirror: www.umorpha.io.har unhar.go
rm -rf $@
go run unhar.go $@ <$<
mirror/%: mirror
test -f $@
rewrite = sed
rewrite += -e 's,https://assets-global.website-files.com/,/webflow-assets/,g'
rewrite += -e 's,https://uploads-ssl.webflow.com/,/webflow-uploads/,g'
rewrite += -e 's,Futura%20Std%20Medium\.ttf,Futura-Std-Medium\.ttf,g'
static/index.html: mirror/www.umorpha.io patches/index.html.patch Makefile
mkdir -p $(@D)
<$< $(rewrite) | (tidy -quiet -indent -wrap 0||true) >$@
patch -i patches/index.html.patch $@
static/webflow-assets/%.js: mirror/assets-global.website-files.com/%.js Makefile
mkdir -p $(@D)
<$< $(rewrite) | js-beautify --stdin >$@
static/webflow-assets/%: mirror/assets-global.website-files.com/% Makefile
mkdir -p $(@D)
$(rewrite) <$< >$@
static/webflow-uploads/%: mirror/uploads-ssl.webflow.com/% Makefile
mkdir -p $(@D)
$(rewrite) <$< >$@