blob: ca8a84fa141c0d256cc9ad2f00f5267052cc3e0a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#! /bin/bash
OUTPUT=magic-secrets.conf
INPUT=$OUTPUT.template
RSCRIPT=secrets-build
if ! grep -q -s '/bin/sed' $RSCRIPT; then
echo '#! /bin/sed -f' > $RSCRIPT;
chmod a+x $RSCRIPT
fi
for n in `grep -o '"#..."' $INPUT`; do
if ! grep -q $n $RSCRIPT; then
echo "New secret ${n} needs to be set in $RSCRIPT!"
echo "s/${n}/${n}/" >> $RSCRIPT;
fi
done
./$RSCRIPT $INPUT > $OUTPUT
|