summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore18
-rw-r--r--Makefile58
-rwxr-xr-xbin-src/cron-daily (renamed from cron-daily)2
-rwxr-xr-xbin-src/crtsh-getcerts (renamed from crtsh-getcerts)0
-rw-r--r--bin-src/crtsh-pem2html.go (renamed from crtsh-pem2html.go)0
-rw-r--r--bin-src/diff-pem2html.go (renamed from diff-pem2html.go)0
-rw-r--r--bin-src/pem-diff.go (renamed from diff.go)0
-rw-r--r--bin-src/tls-getcerts.go (renamed from tls-getcerts.go)0
-rw-r--r--bin-src/tls-pem2html.go (renamed from tls-pem2html.go)0
-rw-r--r--bin-src/util/date.go (renamed from util/date.go)0
-rw-r--r--bin-src/util/html.go (renamed from util/html.go)0
-rw-r--r--cfg/domains.txt (renamed from config-domains.txt)0
-rw-r--r--cfg/jarmon-proton.js (renamed from config-jarmon-proton.js)0
-rw-r--r--cfg/jarmon-winston.js (renamed from config-jarmon-winston.js)0
-rw-r--r--cfg/sockets.txt (renamed from config-sockets.txt)0
-rw-r--r--public-src/colordate.js (renamed from colordate.js)0
-rwxr-xr-xpublic-src/index.html.gen (renamed from index.html.gen)2
l---------public-src/jarmon-dependencies.js (renamed from jarmon-dependencies.js)0
-rw-r--r--public-src/jarmon-style/jquerytools.tabs.tabs-no-images.scss (renamed from jarmon-style/jquerytools.tabs.tabs-no-images.scss)0
l---------public-src/jarmon-style/loading.gif (renamed from jarmon-style/loading.gif)0
l---------public-src/jarmon-style/next.gif (renamed from jarmon-style/next.gif)0
l---------public-src/jarmon-style/prev.gif (renamed from jarmon-style/prev.gif)0
-rw-r--r--public-src/jarmon-style/style.scss (renamed from jarmon-style/style.scss)0
-rw-r--r--public-src/jarmon.html.in (renamed from jarmon.html.in)0
l---------public-src/jarmon.js (renamed from jarmon.js)0
-rw-r--r--public-src/sorttable.js (renamed from sorttable.js)0
-rw-r--r--public-src/style.scss (renamed from style.scss)0
-rw-r--r--systemd/dashboard-daily.service (renamed from dashboard-daily.service)2
-rw-r--r--systemd/dashboard-daily.timer (renamed from dashboard-daily.timer)0
29 files changed, 44 insertions, 38 deletions
diff --git a/.gitignore b/.gitignore
index 9eb8838..56cfb60 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,19 +1,5 @@
-*.css
-*.html
-*.html.part
-*.map
-*.pem
-*.txt
+/bin/
+/public/
NET-*
-!config-*.txt
-!jarmon.html.part
-
-# programs
-crtsh-pem2html
-tls-getcerts
-tls-pem2html
-diff-pem2html
-diff
-
.sass-cache
diff --git a/Makefile b/Makefile
index 3ce825e..2f62fac 100644
--- a/Makefile
+++ b/Makefile
@@ -1,30 +1,48 @@
-all: index.html style.css jarmon-style/jquerytools.tabs.tabs-no-images.css jarmon-style/style.css
+all: public/index.html
+all: public/style.css
+all: public/jarmon-style/jquerytools.tabs.tabs-no-images.css
+all: public/jarmon-style/style.css
-%: %.go util $(wildcard util/*.go)
- go build $<
+NET-%:
+ date > $@
-index.html: tls.html.part crtsh.html.part diff.html.part jarmon.html.in
+.DELETE_ON_ERROR:
+.SECONDARY:
-crtsh.pem: crtsh-getcerts config-domains.txt NET-crtsh
- ./crtsh-getcerts $$(sed 's/#.*//' config-domains.txt) > $@
+# bin/
-tls.pem: tls-getcerts config-sockets.txt NET-tls
- ./tls-getcerts $$(sed 's/#.*//' config-sockets.txt) > $@
+bin/%: bin-src/%.go bin-src/util $(wildcard bin-src/util/*.go)
+ go build -o $@ $<
-diff.pem: diff tls.pem crtsh.pem
- ./diff tls.pem crtsh.pem > $@
+bin/%: bin-src/%
+ @mkdir -p '$(@D)'
+ ln -srTf '$<' '$@'
-tls.html.part crtsh.html.part diff.html.part: %.html.part: %.pem %-pem2html
- ./$*-pem2html < $< > $@
+# public/
-%: %.gen
- ./$< $(filter-out $<,$^) > $@
+public/%: public-src/%
+ @mkdir -p '$(@D)'
+ ln -srTf '$<' '$@'
-%.css: %.scss
- scss $< $@
+public/index.html: public/tls.html.part public/crtsh.html.part public/diff.html.part public/jarmon.html.in
-NET-%:
- date > $@
+public/crtsh.pem: bin/crtsh-getcerts cfg/domains.txt NET-crtsh
+ @mkdir -p '$(@D)'
+ bin/crtsh-getcerts $$(sed 's/#.*//' cfg/domains.txt) > $@
-.DELETE_ON_ERROR:
-.SECONDARY:
+public/tls.pem: bin/tls-getcerts cfg/sockets.txt NET-tls
+ @mkdir -p '$(@D)'
+ bin/tls-getcerts $$(sed 's/#.*//' cfg/sockets.txt) > $@
+
+public/diff.pem: bin/pem-diff public/tls.pem public/crtsh.pem
+ $^ > $@
+
+public/tls.html.part public/crtsh.html.part public/diff.html.part: \
+public/%.html.part: public/%.pem bin/%-pem2html
+ bin/$*-pem2html < $< > $@
+
+public/%: public/%.gen
+ $^ > $@
+
+public/%.css: public/%.scss
+ scss $< $@
diff --git a/cron-daily b/bin-src/cron-daily
index 117eac4..7b71669 100755
--- a/cron-daily
+++ b/bin-src/cron-daily
@@ -1,5 +1,5 @@
#!/bin/sh
-cd "$(dirname -- "$0")"
+cd "$(dirname -- "$0")/.."
date > NET-crtsh
date > NET-tls
make
diff --git a/crtsh-getcerts b/bin-src/crtsh-getcerts
index 0191e2e..0191e2e 100755
--- a/crtsh-getcerts
+++ b/bin-src/crtsh-getcerts
diff --git a/crtsh-pem2html.go b/bin-src/crtsh-pem2html.go
index 109917c..109917c 100644
--- a/crtsh-pem2html.go
+++ b/bin-src/crtsh-pem2html.go
diff --git a/diff-pem2html.go b/bin-src/diff-pem2html.go
index f3b25ff..f3b25ff 100644
--- a/diff-pem2html.go
+++ b/bin-src/diff-pem2html.go
diff --git a/diff.go b/bin-src/pem-diff.go
index da27a62..da27a62 100644
--- a/diff.go
+++ b/bin-src/pem-diff.go
diff --git a/tls-getcerts.go b/bin-src/tls-getcerts.go
index 34e25e5..34e25e5 100644
--- a/tls-getcerts.go
+++ b/bin-src/tls-getcerts.go
diff --git a/tls-pem2html.go b/bin-src/tls-pem2html.go
index bc14f9a..bc14f9a 100644
--- a/tls-pem2html.go
+++ b/bin-src/tls-pem2html.go
diff --git a/util/date.go b/bin-src/util/date.go
index 3b5c457..3b5c457 100644
--- a/util/date.go
+++ b/bin-src/util/date.go
diff --git a/util/html.go b/bin-src/util/html.go
index af2ce60..af2ce60 100644
--- a/util/html.go
+++ b/bin-src/util/html.go
diff --git a/config-domains.txt b/cfg/domains.txt
index 1d5fef5..1d5fef5 100644
--- a/config-domains.txt
+++ b/cfg/domains.txt
diff --git a/config-jarmon-proton.js b/cfg/jarmon-proton.js
index 532f802..532f802 100644
--- a/config-jarmon-proton.js
+++ b/cfg/jarmon-proton.js
diff --git a/config-jarmon-winston.js b/cfg/jarmon-winston.js
index 1349928..1349928 100644
--- a/config-jarmon-winston.js
+++ b/cfg/jarmon-winston.js
diff --git a/config-sockets.txt b/cfg/sockets.txt
index b32a114..b32a114 100644
--- a/config-sockets.txt
+++ b/cfg/sockets.txt
diff --git a/colordate.js b/public-src/colordate.js
index e5331eb..e5331eb 100644
--- a/colordate.js
+++ b/public-src/colordate.js
diff --git a/index.html.gen b/public-src/index.html.gen
index b0e681a..c43beec 100755
--- a/index.html.gen
+++ b/public-src/index.html.gen
@@ -1,4 +1,6 @@
#!/bin/sh
+set -e
+cd "$(dirname -- "$0")"
col() {
echo '<div>'
diff --git a/jarmon-dependencies.js b/public-src/jarmon-dependencies.js
index 9874026..9874026 120000
--- a/jarmon-dependencies.js
+++ b/public-src/jarmon-dependencies.js
diff --git a/jarmon-style/jquerytools.tabs.tabs-no-images.scss b/public-src/jarmon-style/jquerytools.tabs.tabs-no-images.scss
index d97f579..d97f579 100644
--- a/jarmon-style/jquerytools.tabs.tabs-no-images.scss
+++ b/public-src/jarmon-style/jquerytools.tabs.tabs-no-images.scss
diff --git a/jarmon-style/loading.gif b/public-src/jarmon-style/loading.gif
index 03b9781..03b9781 120000
--- a/jarmon-style/loading.gif
+++ b/public-src/jarmon-style/loading.gif
diff --git a/jarmon-style/next.gif b/public-src/jarmon-style/next.gif
index 16a6d9d..16a6d9d 120000
--- a/jarmon-style/next.gif
+++ b/public-src/jarmon-style/next.gif
diff --git a/jarmon-style/prev.gif b/public-src/jarmon-style/prev.gif
index 72199f2..72199f2 120000
--- a/jarmon-style/prev.gif
+++ b/public-src/jarmon-style/prev.gif
diff --git a/jarmon-style/style.scss b/public-src/jarmon-style/style.scss
index 5641550..5641550 100644
--- a/jarmon-style/style.scss
+++ b/public-src/jarmon-style/style.scss
diff --git a/jarmon.html.in b/public-src/jarmon.html.in
index 3486edb..3486edb 100644
--- a/jarmon.html.in
+++ b/public-src/jarmon.html.in
diff --git a/jarmon.js b/public-src/jarmon.js
index 1c0e4a9..1c0e4a9 120000
--- a/jarmon.js
+++ b/public-src/jarmon.js
diff --git a/sorttable.js b/public-src/sorttable.js
index 38b0fc6..38b0fc6 100644
--- a/sorttable.js
+++ b/public-src/sorttable.js
diff --git a/style.scss b/public-src/style.scss
index 70747bd..70747bd 100644
--- a/style.scss
+++ b/public-src/style.scss
diff --git a/dashboard-daily.service b/systemd/dashboard-daily.service
index bafdbdd..492fad2 100644
--- a/dashboard-daily.service
+++ b/systemd/dashboard-daily.service
@@ -3,4 +3,4 @@ Description=Dashboard daily update
[Service]
Type=oneshot
-ExecStart=/bin/sh -c '~/dashboard/cron-daily'
+ExecStart=/bin/sh -c '~/dashboard/bin/cron-daily'
diff --git a/dashboard-daily.timer b/systemd/dashboard-daily.timer
index de7df23..de7df23 100644
--- a/dashboard-daily.timer
+++ b/systemd/dashboard-daily.timer