Test pattern with the keyword "case".
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 12 Nov 2023 16:48:31 +0200
changeset 1026 865f28fee788
parent 1025 03c2b7f76bb7
child 1027 50902745d28c
Test pattern with the keyword "case".
Makefile
--- a/Makefile	Sun Nov 12 16:42:08 2023 +0200
+++ b/Makefile	Sun Nov 12 16:48:31 2023 +0200
@@ -113,11 +113,10 @@
 	declare -a files
 	for item in $(OVERRIDDEN_ITEMS); do
 		if [[ -f $$item ]]; then
-			if [[ $$item == */* ]]; then
-				$(INSTALL_DATA) $$item $(HOME)/$$item
-			else
-				files+=($$item)
-			fi
+			case "$$item" in
+				*/*) $(INSTALL_DATA) $$item $(HOME)/$$item ;;
+				*) files+=($$item) ;;
+			esac
 		elif [[ -d $$item ]]; then
 			find $$item -type f -exec $(INSTALL_DATA) {} $(HOME)/{} ';'
 		fi