Test pattern with the keyword "case".
--- 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