Skip to content

Commit

Permalink
feat: improve script latency
Browse files Browse the repository at this point in the history
Signed-off-by: Yasunori Fujie <fujie@ai2-jp.com>
  • Loading branch information
yacchi committed Aug 25, 2021
1 parent 67e6bb8 commit 2ce05aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/lib/tools
5 changes: 4 additions & 1 deletion lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ go_plugin_tool() {
# tools.go <command> [arguments]
(
cd "${current_script_dir}"
go_cmd run "tools.go" "$@"
if [[ ! -f "tools" || "tools.go" -nt "tools" ]]; then
go_cmd build -o ./tools tools.go
fi
./tools "$@"
)
}

Expand Down

0 comments on commit 2ce05aa

Please sign in to comment.