From 688be58f5226cc8d56ebd61e95bb9945aec77f5d Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Fri, 2 Mar 2018 09:36:58 -0500
Subject: [PATCH 2/2] Fix INSTALL_COMPLETION syntax
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
---
resources/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/resources/Makefile b/resources/Makefile
index cbe89b1126b319d253e0101ae4dc1a875f32d4b5..17a21a983c05b019643323ed3c9418daa0930249 100644
--- a/resources/Makefile
+++ b/resources/Makefile
@@ -42,11 +42,11 @@ SYSCONFDIR ?= /etc
ROOT ?= /
A_INIT = ../bin/argbash-init
GENPARSE = ../bin/argbash
COMPLETION = argbash.sh
-INSTALL_COMPLETION = no
+INSTALL_COMPLETION ?= no
ARGBASH_EXEC ?= $(GENPARSE)
ARGBASH_INIT_EXEC ?= $(A_INIT)
EXAMPLES = \
examples/minimal.sh \
examples/simple.sh \
@@ -150,11 +150,11 @@ install: $(GENPARSE) $(A_INIT) $(ARGBASH_TO) $(COMPLETION)
cp -p $(M4_SRC) "$(ROOT)/$(PREFIXED_LIBDIR)/argbash$(VERSION_SUFFIX)/"
grep -q 'm4dir=' $(GENPARSE) && sed -e 's|m4dir=.*|m4dir=/$(PREFIXED_LIBDIR)/argbash$(VERSION_SUFFIX)|' $(GENPARSE) > "$(ROOT)/$(PREFIX)/bin/argbash$(VERSION_SUFFIX)"
test -n "$(VERSION_SUFFIX)" || test -z "$(ARGBASH_TO)" || { cp -p $(ARGBASH_TO) "$(ROOT)/$(PREFIX)/bin" && chmod a+x "$(ROOT)/$(PREFIX)"/bin/argbash-*; }
cp -p $(A_INIT) "$(ROOT)/$(PREFIX)/bin/argbash-init$(VERSION_SUFFIX)" && chmod a+x "$(ROOT)/$(PREFIX)"/bin/argbash-init$(VERSION_SUFFIX)
chmod a+x "$(ROOT)/$(PREFIX)/bin/argbash$(VERSION_SUFFIX)"
- test "$(INSTALL_COMPLETION)" = "no" || mkdir -p "$(ROOT)/$(SYSCONFDIR)/bash_completion.d" && mv "$(COMPLETION)" "$(ROOT)/$(SYSCONFDIR)/bash_completion.d/"
+ test "$(INSTALL_COMPLETION)" = "no" || (mkdir -p "$(ROOT)/$(SYSCONFDIR)/bash_completion.d" && mv "$(COMPLETION)" "$(ROOT)/$(SYSCONFDIR)/bash_completion.d/")
altpreclean: define-version
$(RM) "$(ROOT)/$(PREFIX)/bin/argbash-$(VERSION_MAJOR).$(VERSION_MINOR)"
$(RM) "$(ROOT)/$(PREFIX)/bin/argbash-$(VERSION_MAJOR)"
$(RM) "$(ROOT)/$(PREFIX)/bin/argbash"
--
2.14.3