[PATCH] subcmd: pass -m as first argument to install

From: Haelwenn (lanodan) Monnier
Date: Wed Aug 14 2024 - 17:56:54 EST


Otherwise it gets parsed as a file when a non-GNU getopt(3) is used.

Signed-off-by: Haelwenn (lanodan) Monnier <contact@xxxxxxxxxxxx>
---
tools/lib/subcmd/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/subcmd/Makefile b/tools/lib/subcmd/Makefile
index b87213263..138bfdf05 100644
--- a/tools/lib/subcmd/Makefile
+++ b/tools/lib/subcmd/Makefile
@@ -92,7 +92,7 @@ define do_install
if [ ! -d '$2' ]; then \
$(INSTALL) -d -m 755 '$2'; \
fi; \
- $(INSTALL) $1 $(if $3,-m $3,) '$2'
+ $(INSTALL) $(if $3,-m $3,) $1 '$2'
endef

install_lib: $(LIBFILE)
--
2.44.2