github.com/lestrrat-go/jwx/v2@v2.0.21/tools/cmd/genreadfile.sh (about) 1 #!/bin/bash 2 3 # Script to perform code generation. This exists to overcome 4 # the fact that go:generate doesn't really allow you to change directories 5 6 set -e 7 8 echo "👉 Generating ReadFile() for each package..." 9 export GOWORK=off 10 DIR="tools/cmd/genreadfile" 11 pushd "$DIR" > /dev/null 12 go build -o .genreadfile main.go 13 popd > /dev/null 14 15 EXE="$DIR/.genreadfile" 16 "$EXE" 17 echo "✔ done!" 18 19 rm "$EXE"