From bfbdf29ca3a60798c5267e88de5577a3faead9e9 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Fri, 8 Dec 2023 05:42:24 +0100 Subject: More basic stuff --- Makefile | 6 ++++-- gen-initialize.sh | 6 ++++++ initialize.sql | 34 ++++++++++++++++++++++++++++++ main.go | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 101 insertions(+), 7 deletions(-) create mode 100755 gen-initialize.sh create mode 100644 initialize.sql diff --git a/Makefile b/Makefile index 9c5bc80..caefa2f 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,13 @@ .POSIX: .SUFFIXES: -outputs = gallery public/mithril.js +outputs = gallery initialize.go public/mithril.js all: $(outputs) -gallery: main.go +gallery: main.go initialize.go go build -o $@ +initialize.go: initialize.sql gen-initialize.sh + ./gen-initialize.sh initialize.sql > $@ public/mithril.js: curl -Lo $@ https://unpkg.com/mithril/mithril.js clean: diff --git a/gen-initialize.sh b/gen-initialize.sh new file mode 100755 index 0000000..8d8cb55 --- /dev/null +++ b/gen-initialize.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e +gofmt <