From cb5f46e3fb0d2f9794bc0e4b937433dbe27ba4f0 Mon Sep 17 00:00:00 2001 From: Morgan Aldridge Date: Tue, 7 May 2024 12:17:20 -0400 Subject: [PATCH] Updated Makefile's 'install' & 'install-bin' targets to find & move target files to a timestamped backup before performing installing. This fixes Issue #13 by removing the non-portable install(1) '-B' option, plus partially addresses Issue #8 by not overwriting the user's .mlvwm directory contents (though they'd still have to diff & restore any modifications manually). --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 22e72ef..bd8ef04 100644 --- a/Makefile +++ b/Makefile @@ -65,13 +65,15 @@ patterns: unzip -d $(PATTERNS) "$(TEMP)/Mac OS Solid Color Backgrounds.zip" install: install-bin + find $(HOME) -name ".mlvwm" -type d -exec mv {}{,.$(date +%Y%m%d-%H%M%S)} \; cp -R $(CONF) $(HOME)/ ln -fs $(HOME)/$(CONF)/.mlvwmrc $(HOME)/.mlvwmrc sed -i 's@/home2/tak/bin/pixmap@$(HOME)/$(PIXMAP)@g' $(HOME)/$(CONF)/.mlvwmrc install-bin: mkdir -p $(HOME)/$(BIN) - install -b -B .`date +%Y%m%d-%H%M%S` -m 700 -o $(USER) $(BIN)/mlvwm-* $(HOME)/$(BIN) + find ${HOME}/$(BIN) -name "mlvwm-*" ! -name "*.*" -exec mv {}{,.$(date +%Y%m%d-%H%M%S)} \; + install -m 700 -o $(USER) $(BIN)/mlvwm-* $(HOME)/$(BIN) clean: clean-pixmap rm -r $(TEMP)