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

Haelwenn (lanodan) Monnier posted 1 patch 1 year, 5 months ago
tools/lib/subcmd/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] subcmd: pass -m as first argument to install
Posted by Haelwenn (lanodan) Monnier 1 year, 5 months ago
Otherwise it gets parsed as a file when a non-GNU getopt(3) is used.

Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
---
 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