From 4ee2b3ecc73882cfecdbe2162d4fece406a110e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Rodr=C3=ADguez?= Date: Sun, 10 Sep 2023 15:30:47 +0200 Subject: [PATCH] Backup config if exists when installing (#536) When installing, checks if `${DESTDIR}/etc/ly/config.ini` exists and if it does, copies it to `${DESTDIR}/etc/ly/config.ini.old` --- makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/makefile b/makefile index e5fa5b2..b59470d 100644 --- a/makefile +++ b/makefile @@ -73,6 +73,8 @@ install: $(BIND)/$(NAME) @echo "installing ly" @install -dZ ${DESTDIR}/etc/ly @install -DZ $(BIND)/$(NAME) -t ${DESTDIR}/usr/bin + @if [ -e ${DESTDIR}/etc/ly/config.ini ]; then \ + cp ${DESTDIR}/etc/ly/config.ini ${DESTDIR}/etc/ly/config.ini.old; fi @install -DZ $(RESD)/config.ini -t ${DESTDIR}/etc/ly @install -DZ $(RESD)/xsetup.sh -t $(DATADIR) @install -DZ $(RESD)/wsetup.sh -t $(DATADIR)