From 8c438b5029280b67fa41d6bac9ea4cf917cd75e8 Mon Sep 17 00:00:00 2001 From: brunorro Date: Sat, 19 Aug 2023 09:30:51 +0200 Subject: [PATCH] Backup config if exists when installing 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 e5fa5b24..b59470d0 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)