Recently Written · git

sbm-webpublish

Publish an sbm bookmark file as a list of links on a web site

git clone https://github.com/equwal/sbm-webpublish

Log | Files | Refs


deploy/include.awk (524 bytes)

1 # include.awk: add "include snippets/sbm-webpublish.conf;" to each HTTPS
2 # server block of an nginx site file. The line goes above the first
3 # "listen ... 443" line of each server block, because only an HTTPS server
4 # block has that line. deploy.sh runs this only when the file does not
5 # include the snippet yet.
6 /^[ \t]*server[ \t]*(\{|$)/ { done = 0 }
7 !done && /^[ \t]*listen[ \t]+([^;]*:)?443([ \t;]|$)/ {
8 	match($0, /^[ \t]*/)
9 	print substr($0, 1, RLENGTH) "include snippets/sbm-webpublish.conf;"
10 	done = 1
11 }
12 { print }