No need for "mkdir", option "-D" of "install" takes care about missing directories.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 08 Jan 2021 13:24:06 +0200
changeset 962 88a1ce08b362
parent 961 d7b4c9d10b92
child 963 d008686721c6
No need for "mkdir", option "-D" of "install" takes care about missing directories.
Makefile
--- a/Makefile	Fri Jan 08 13:12:40 2021 +0200
+++ b/Makefile	Fri Jan 08 13:24:06 2021 +0200
@@ -117,11 +117,7 @@
 				files+=($$item)
 			fi
 		elif [[ -d $$item ]]; then
-			for file in `find $$item`; do
-				if [[ -d $$file ]]; then
-					mkdir -p $(HOME)/$$file
-					continue
-				fi
+			for file in `find $$item -type f`; do
 				$(INSTALL_DATA) $$file $(HOME)/$$file
 			done
 		fi
@@ -144,11 +140,7 @@
 			$(INSTALL_DATA) $$item $(HOME)/$$item
 		fi
 		if [[ -d $$item ]]; then
-			for file in `find $$item`; do
-				if [[ -d $$file ]]; then
-					mkdir -p $(HOME)/$$file
-					continue
-				fi
+			for file in `find $$item -type f`; do
 				if [[ ! -f $(HOME)/$$file ]]; then
 					$(INSTALL_DATA) $$file $(HOME)/$$file
 				fi