-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmkfile
47 lines (36 loc) · 757 Bytes
/
mkfile
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
ALL=nyne nynetab com xcom a+ a- save md move f+ f- font xec nstart
all:V: ${ALL:%=bin/%}
bin:
mkdir bin
bin/%:V: ./cmd/% bin
go build -o bin/$stem cmd/$stem/*.go
install:
go install ./...
mac:V:
cp -r mac/Acme.app /Applications/
MKSHELL=$PLAN9/bin/rc
uninstall-rc:V:
for(cmd in $ALL) rm -f $GOPATH/bin/$cmd
MKSHELL=sh
uninstall-sh:V:
for cmd in $ALL; do
rm -f $GOPATH/bin/$cmd
done
uninstall:V: uninstall-sh uninstall-rc
check:
go test -count=1 ./...
go fmt ./...
go vet ./...
golint ./...
staticcheck ./...
MKSHELL=$PLAN9/bin/rc
readmes:
for(f in `{ls cmd}){
cd $f && \
goreadme -credit=false -title=`{echo $f | sed 's/cmd\///'} \
| sed 's/```go/```/g' \
>README.md && \
cd ../..
}
clean tidy nuke:V:
rm -rf ./bin