# HG changeset patch # User Oleksandr Gavenko # Date 1610104360 -7200 # Node ID d7b4c9d10b921de32ec1b75c1f21dba3cda8ccf1 # Parent b4b2d30f6c97557127889975fddbe7f0241faa9a Collect and copy all files belonging to root of $HOME in one step. This speedups install in Cygwin: 7s => 5s. diff -r b4b2d30f6c97 -r d7b4c9d10b92 Makefile --- a/Makefile Fri Jan 08 12:46:52 2021 +0200 +++ b/Makefile Fri Jan 08 13:12:40 2021 +0200 @@ -108,11 +108,15 @@ .PHONY: install .ONESHELL: install: + declare -a files for item in $(OVERRIDDEN_ITEMS); do if [[ -f $$item ]]; then - $(INSTALL_DATA) $$item $(HOME)/$$item - fi - if [[ -d $$item ]]; then + if [[ $$item == */* ]]; then + $(INSTALL_DATA) $$item $(HOME)/$$item + else + files+=($$item) + fi + elif [[ -d $$item ]]; then for file in `find $$item`; do if [[ -d $$file ]]; then mkdir -p $(HOME)/$$file @@ -122,6 +126,7 @@ done fi done + $(INSTALL_DATA) -t $(HOME) "$${files[@]}" chmod 700 ~/.gnupg/ chmod a+x ~/.fvwm/FvwmKbdd.pl ~/.fvwm/xinit command -v fvwm || exit 0