Back up old config file on running .configure

This commit is contained in:
Erik Stambaugh 2024-01-26 16:42:37 -08:00
parent e0782d63da
commit a4e2957b19
2 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View file

@ -18,3 +18,4 @@ pubkey
.ses_secret .ses_secret
ansible/credentials ansible/credentials
terraform/dns_*.tf terraform/dns_*.tf
config.mk.bak

7
configure vendored
View file

@ -67,7 +67,12 @@ while read LINE <&4; do
done 4< <(cat config.mk.in) done 4< <(cat config.mk.in)
echo echo
echo "All done! Putting your configuration into config.mk"
if [[ -e config.mk ]]; then
echo "Backing up your old config to config.mk.bak"
cp config.mk config.mk.bak
fi
echo "All done! Putting your configuration into config.mk."
mv $TEMPFILE config.mk mv $TEMPFILE config.mk