-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (28 loc) · 1.12 KB
/
Makefile
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
.PHONY: dotfiles
dotfiles: ## Installs the dotfiles.
# add aliases for dotfiles
for file in $(shell find $(CURDIR) -name ".*" -not -name ".gitignore" -not -name ".gitignore.global" -not -name ".travis.yml" -not -name ".git" -not -name ".*.swp" -not -name ".gnupg"); do \
f=$$(basename $$file); \
ln -sfn $$file $(HOME)/$$f; \
done; \
# gpg --list-keys || true;
ln -sfn $(CURDIR)/.gnupg/gpg.conf $(HOME)/.gnupg/gpg.conf;
ln -sfn $(CURDIR)/.gnupg/gpg-agent.conf $(HOME)/.gnupg/gpg-agent.conf;
ln -fn $(CURDIR)/.gitignore.global $(HOME)/.gitignore;
git update-index --skip-worktree $(CURDIR)/.gitconfig;
ln -snf $(CURDIR)/.bash_profile $(HOME)/.profile;
.PHONY: test
test: shellcheck
# if this session isn't interactive, then we don't want to allocate a
# TTY, which would fail, but if it is interactive, we do want to attach
# so that the user can send e.g. ^C through.
INTERACTIVE := $(shell [ -t 0 ] && echo 1 || echo 0)
ifeq ($(INTERACTIVE), 1)
DOCKER_FLAGS += -t
endif
.PHONY: shellcheck
shellcheck:
docker run --rm -i $(DOCKER_FLAGS) \
-v $(CURDIR):/opt/src:ro \
--workdir /opt/src \
r.j3ss.co/shellcheck ./test.sh