Skip to content

Commit 56c8c66

Browse files
committed
Merge pull request contiv#250 from vijayvikrant/cli_autocompletion
netctl cli autocompletion - static and dynamic
2 parents 6f6477a + ba10e46 commit 56c8c66

File tree

4 files changed

+727
-45
lines changed

4 files changed

+727
-45
lines changed

Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
# find all verifiable packages.
55
# XXX: explore a better way that doesn't need multiple 'find'
6-
PKGS := `find . -mindepth 1 -maxdepth 1 -type d -name '*' | grep -vE '/\..*$\|Godeps|examples|docs|scripts|mgmtfn|bin'`
7-
PKGS += `find . -mindepth 2 -maxdepth 2 -type d -name '*'| grep -vE '/\..*$\|Godeps|examples|docs|scripts|bin'`
6+
PKGS := `find . -mindepth 1 -maxdepth 1 -type d -name '*' | grep -vE '/\..*$\|Godeps|examples|docs|scripts|mgmtfn|bin|contrib'`
7+
PKGS += `find . -mindepth 2 -maxdepth 2 -type d -name '*'| grep -vE '/\..*$\|Godeps|examples|docs|scripts|bin|contrib'`
88
TO_BUILD := ./netplugin/ ./netmaster/ ./netctl/netctl/ ./mgmtfn/k8splugin/contivk8s/
99
HOST_GOBIN := `if [ -n "$$(go env GOBIN)" ]; then go env GOBIN; else dirname $$(which go); fi`
1010
HOST_GOROOT := `go env GOROOT`
@@ -39,7 +39,8 @@ checks:
3939
run-build: deps checks clean
4040
cd ${GOPATH}/src/github.com/contiv/netplugin && version/generate_version ${USE_RELEASE} && \
4141
cd /opt/gopath/src/github.com/contiv/netplugin && \
42-
godep go install -v $(TO_BUILD)
42+
godep go install -v $(TO_BUILD) && \
43+
sudo cp contrib/completion/bash/netctl /etc/bash_completion.d/netctl
4344

4445
build:
4546
make start
@@ -132,7 +133,7 @@ only-tar:
132133

133134
tar: clean-tar build
134135
@cat ${GOPATH}/src/github.com/contiv/netplugin/version/version_gen.go | grep versionStr | cut -f 4 -d " " | tr -d \" > $(VERSION_FILE)
135-
@tar -jcf $(TAR_FILE) -C $(GOPATH)/src/github.com/contiv/netplugin/bin netplugin netmaster netctl contivk8s
136+
@tar -jcf $(TAR_FILE) -C $(GOPATH)/src/github.com/contiv/netplugin/bin netplugin netmaster netctl contivk8s -C $(GOPATH)/src/github.com/contiv/netplugin contrib/completion/bash/netctl
136137

137138
clean-tar:
138139
@rm -f $(TAR_LOC)/*.$(TAR_EXT)

0 commit comments

Comments
 (0)