-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
16 lines (14 loc) · 992 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
.PHONY: all
include secrets
all:
rm -rf ./config.tmp
cp -a template config.tmp
find config.tmp/ -type f -print0 | xargs -0 sed -i 's/%%DOMAIN_NAME%%/${DOMAIN_NAME}/g'
find config.tmp/ -type f -print0 | xargs -0 sed -i 's/%%EMAIL%%/${EMAIL}/'
find config.tmp/ -type f -print0 | xargs -0 sed -i 's/%%POSTGRES_PASSWORD%%/${POSTGRES_PASSWORD}/'
find config.tmp/ -type f -print0 | xargs -0 sed -i 's/%%SYNAPSE_REGISTRATION_SHARED_SECRET%%/${SYNAPSE_REGISTRATION_SHARED_SECRET}/'
find config.tmp/ -type f -print0 | xargs -0 sed -i 's/%%SYNAPSE_MACAROON_SECRET_KEY%%/${SYNAPSE_MACAROON_SECRET_KEY}/'
find config.tmp/ -type f -print0 | xargs -0 sed -i 's/%%SYNAPSE_FORM_SECRET%%/${SYNAPSE_FORM_SECRET}/'
find config.tmp/ -type f -print0 | xargs -0 sed -i 's/%%SYNAPSE_REGISTRATION%%/${SYNAPSE_REGISTRATION}/'
echo ${SYNAPSE_SIGNING_KEY} > config.tmp/synapse/synapse.signing.key
sed 's|%%SSH_PUBKEY%%|${SSH_PUBKEY}|' config.bu | butane --files-dir config.tmp --strict --output config.ign