-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (40 loc) · 1.22 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
SCRIPTS=./bin/installer \
src/plugins/file.sh \
src/plugins/git.sh \
src/plugins/local.sh \
src/plugins/svn.sh \
src/plugins/symlink.sh \
src/plugins/tar.sh \
src/plugins/zip.sh \
src/mulle-fetch-archive.sh \
src/mulle-fetch-commands.sh \
src/mulle-fetch-curl.sh \
src/mulle-fetch-git.sh \
src/mulle-fetch-operation.sh \
src/mulle-fetch-plugin.sh \
src/mulle-fetch-source.sh \
src/mulle-fetch-url.sh
CHECKSTAMPS=$(SCRIPTS:.sh=.chk)
#
# catch some more glaring problems, the rest is done with sublime
#
SHELLFLAGS=-x -e SC2016,SC2034,SC2086,SC2164,SC2166,SC2006,SC1091,SC2039,SC2181,SC2059,SC2196,SC2197 -s sh
.PHONY: all
.PHONY: clean
.PHONY: shellcheck_check
%.chk: %.sh
- shellcheck $(SHELLFLAGS) $<
(shellcheck -f json $(SHELLFLAGS) $< | jq '.[].level' | grep -w error > /dev/null ) && exit 1 || touch $@
all: $(CHECKSTAMPS) mulle-fetch.chk shellcheck_check jq_check
mulle-fetch.chk: mulle-fetch
- shellcheck $(SHELLFLAGS) $<
(shellcheck -f json $(SHELLFLAGS) $< | jq '.[].level' | grep -w error > /dev/null ) && exit 1 || touch $@
installer:
@ ./bin/installer
clean:
@- rm src/*.chk
@- rm src/plugins/*.chk
shellcheck_check:
which shellcheck || brew install shellcheck
jq_check:
which shellcheck || brew install shellcheck