Skip to content

Commit

Permalink
add sync.sh go tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiyo510 committed Apr 1, 2024
1 parent bf02f61 commit 1ed5681
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions asdf/go/go_tool.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github.com/cosmtrek/air
github.com/go-delve/delve/cmd/dlv
github.com/reviewdog/reviewdog/cmd/reviewdog
github.com/tsenart/vegeta
18 changes: 18 additions & 0 deletions asdf/go/sync.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -eu

SCRIPT_DIR=$(cd $(dirname "$0") && pwd)

GO_TOOL_PATH="$SCRIPT_DIR/go_tool.txt"

if [ ! -f "$GO_TOOL_PATH" ]; then
echo "go_tool.txt not found."
exit 1
fi

while IFS= read -r line; do
echo "installing $line..."
asdf exec go install "$line@latest"
done < "$GO_TOOL_PATH"

echo "go install done."
1 change: 1 addition & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ source "$PROJECT_ROOT/alfred/sync.sh"
source "$PROJECT_ROOT/alacritty/sync.sh"
source "$PROJECT_ROOT/zsh/macos_defaults.sh"
source "$PROJECT_ROOT/git/sync.sh"
source "$PROJECT_ROOT/asdf/go/sync.sh"

# install z
if ! command -v z >/dev/null 2>&1; then
Expand Down

0 comments on commit 1ed5681

Please sign in to comment.