File tree Expand file tree Collapse file tree 1 file changed +20
-7
lines changed
content/learning-paths/servers-and-cloud-computing/go-benchmarking-with-sweet/refactor1 Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,32 @@ A tool for running Go benchmarks using Sweet on remote GCP instances and compari
1111``` bash
1212# macOS (using Homebrew)
1313brew update
14- brew install pyenv
14+
15+ # Check if pyenv is already installed (via PATH or Homebrew), install if not
16+ if which pyenv & > /dev/null || brew list pyenv & > /dev/null; then
17+ echo " pyenv is already installed"
18+ else
19+ echo " Installing pyenv..."
20+ brew install pyenv
21+ fi
1522
1623# Linux
1724sudo apt-get -y update
1825
1926sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev
2027
21- curl https://pyenv.run | bash
22-
23- # Add to your shell configuration (.bashrc, .zshrc, etc.)
24- echo ' export PYENV_ROOT="$HOME/.pyenv"' >> ~ /.bashrc
25- echo ' command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~ /.bashrc
26- echo ' eval "$(pyenv init -)"' >> ~ /.bashrc
28+ # Check if pyenv is already installed
29+ if which pyenv & > /dev/null; then
30+ echo " pyenv is already installed"
31+ else
32+ echo " Installing pyenv..."
33+ curl https://pyenv.run | bash
34+
35+ # Add to your shell configuration (.bashrc, .zshrc, etc.)
36+ echo ' export PYENV_ROOT="$HOME/.pyenv"' >> ~ /.bashrc
37+ echo ' command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~ /.bashrc
38+ echo ' eval "$(pyenv init -)"' >> ~ /.bashrc
39+ fi
2740```
2841
2942Restart your shell or run ` source ~/.bashrc ` (or your appropriate shell config file).
You can’t perform that action at this time.
0 commit comments