-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
33 lines (23 loc) · 587 Bytes
/
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
PREFIX ?= /usr/local
BINDIR := $(PREFIX)/bin
.PHONY: build check test dist clean install uninstall
build:
cat ./src/header > ./shdotenv
./src/build.sh < src/shdotenv >> ./shdotenv
chmod +x ./shdotenv
all: check test build
check:
shfmt -d -ci -i 2 -ln posix src/build.sh src/shdotenv
shellcheck src/build.sh src/shdotenv
test:
shellspec +q
fix:
shfmt -w -ci -i 2 -ln posix src/build.sh src/shdotenv
dist: build
tar czf shdotenv.tar.gz shdotenv
clean:
rm -f shdotenv shdotenv.tar.gz
install:
install -m 755 shdotenv $(BINDIR)/shdotenv
uninstall:
rm $(BINDIR)/shdotenv