File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -euo pipefail
3
- (cd " $( dirname " $0 " ) /../cmd/participle" && go install github.com/alecthomas/participle/v2/cmd/participle)
4
- exec " $( go env GOBIN) /participle" " $@ "
3
+ GOBIN=$( go env GOBIN)
4
+ [[ -d " ${GOBIN} " ]] || GOBIN=$( go env GOPATH) /bin
5
+ go install -C " $( dirname " $0 " ) /../cmd/participle" ' github.com/alecthomas/participle/v2/cmd/participle'
6
+ exec " ${GOBIN} /participle" " $@ "
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -euo pipefail
3
- participle gen lexer --name GeneratedBasic internal < lexer/internal/basiclexer.json | gofmt > lexer/internal/basiclexer.go
3
+ path=$( dirname " ${0} " )
4
+ base=" ${path} /../lexer/internal/basiclexer"
5
+ " ${path} /participle" gen lexer --name GeneratedBasic internal < " ${base} .json" | gofmt > " ${base} .go"
You can’t perform that action at this time.
0 commit comments