diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae21331 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/lib/tools diff --git a/lib/utils.bash b/lib/utils.bash index 58ba62e..794cdee 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -38,7 +38,10 @@ go_plugin_tool() { # tools.go [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 "$@" ) }