From f0569247f4d9c16bf1ec9cb1a1c948bb8fed4df7 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 25 Jul 2022 13:39:27 -0700 Subject: [PATCH] Makefiles: Fix bashisms. (#88) --- include/ircd/Makefile.am | 14 ++++++++++---- share/Makefile.am | 14 ++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/include/ircd/Makefile.am b/include/ircd/Makefile.am index 1540bd85f..06aff91b1 100644 --- a/include/ircd/Makefile.am +++ b/include/ircd/Makefile.am @@ -95,8 +95,14 @@ install-mkdirs: $(DEPS) $(BUILT_SOURCES) install: install-mkdirs @echo "ircd: installing headers" @for i in $(srcdir)/*; do \ - if [[ "$$i" != "./Makefile"* ]] && [[ "$$i" != *.h.gch ]]; then \ - echo "installing $$i to $(DESTDIR)$(includedir)"; \ - cp -u -r $$i $(DESTDIR)$(includedir); \ - fi \ + case "$$i" in \ + "./Makefile"*) \ + ;; \ + *".h.gch") \ + ;; \ + *) \ + echo "installing $$i to $(DESTDIR)$(includedir)"; \ + cp -u -r $$i $(DESTDIR)$(includedir); \ + ;; \ + esac \ done diff --git a/share/Makefile.am b/share/Makefile.am index 8c0dea19e..769dcd0e3 100644 --- a/share/Makefile.am +++ b/share/Makefile.am @@ -14,8 +14,14 @@ install-mkdirs: install: install-mkdirs @echo "ircd: installing shared assets" @for i in $(srcdir)/*; do \ - if [[ "$$i" != "./Makefile"* ]] && [[ "$$i" != "README.md" ]]; then \ - echo "installing $$i to $(DESTDIR)$(datadir)"; \ - cp -r $$i $(DESTDIR)$(datadir); \ - fi \ + case "$$i" in \ + "./Makefile"*) \ + ;; \ + "README.md") \ + ;; \ + *) \ + echo "installing $$i to $(DESTDIR)$(datadir)"; \ + cp -u -r $$i $(DESTDIR)$(datadir); \ + ;; \ + esac \ done