Makefile
changeset 961 d7b4c9d10b92
parent 960 b4b2d30f6c97
child 962 88a1ce08b362
--- 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