Collect and copy all files belonging to root of $HOME in one step. This speedups install in Cygwin: 7s => 5s.
--- 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