From a4e2957b19e538c45114eb7faabe111d6d494606 Mon Sep 17 00:00:00 2001 From: Erik Stambaugh Date: Fri, 26 Jan 2024 16:42:37 -0800 Subject: [PATCH] Back up old config file on running .configure --- .gitignore | 1 + configure | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4c3333a..331a669 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ pubkey .ses_secret ansible/credentials terraform/dns_*.tf +config.mk.bak diff --git a/configure b/configure index cf5fb11..c8e88d4 100755 --- a/configure +++ b/configure @@ -67,7 +67,12 @@ while read LINE <&4; do done 4< <(cat config.mk.in) 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