-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.scli
41 lines (24 loc) · 864 Bytes
/
Makefile.scli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# scli plugin install Makefile
.PHONY: brew bash-completion brew deps install uninstall description symlink
install: deps
@cp bash-complete-api ${SCLI_PLUGIN_DESTDIR}/bash-complete-api
symlink:
@ln -fs ${SCLI_PLUGIN_SCLI_PLUGIN_DESTDIR}/bash-complete-api ${SYMLINK_DIR}/scli_bash-complete-api
deps: bash-completion
uninstall:
rm -rf ${SCLI_PLUGIN_DESTDIR}
description:
@echo "Bash command that queries bash completions."
is_library:
@true
# macos magic follows
MACOS = $(shell echo $$OSTYPE | sed -e '1s/^darwin.*$$/yes/')
ifeq "${MACOS}" "yes"
bash-completion: brew
@[ -f $$(brew --prefix)/etc/bash_completion ] || echo "Please install bash-completions"
brew:
@brew --version >/dev/null || echo "Please install brew"
else
bash-completion:
@[ -f /usr/share/bash-completion/bash_completion ] || echo "Please install bash-completions"
endif