Scripts to update pyenv/rbenv
Some checks failed
Lint / Lint (3.10) (push) Failing after 22s
Lint / Lint (3.11) (push) Failing after 19s

This commit is contained in:
Ariejan de Vroom 2024-08-30 11:24:39 +02:00
parent 88cee262f7
commit 29ed27068c
Signed by: ariejan
GPG Key ID: AD739154F713697B
5 changed files with 56 additions and 0 deletions

17
scripts/_setup_pyenv.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# Define the repository URL and the directory name
REPO_URL="https://github.com/pyenv/pyenv.git"
DIR_NAME="$HOME/.pyenv"
echo "=== Setting up pyenv ==="
# Check if the directory exists
if [ -d "$DIR_NAME" ]; then
echo "Directory $DIR_NAME exists. Pulling latest changes..."
cd "$DIR_NAME"
git pull
else
echo "Directory $DIR_NAME does not exist. Cloning repository..."
git clone "$REPO_URL"
fi

17
scripts/_setup_rbenv.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# Define the repository URL and the directory name
REPO_URL="https://github.com/rbenv/rbenv.git"
DIR_NAME="$HOME/.rbenv"
echo "=== Setting up rbenv ==="
# Check if the directory exists
if [ -d "$DIR_NAME" ]; then
echo "Directory $DIR_NAME exists. Pulling latest changes..."
cd "$DIR_NAME"
git pull
else
echo "Directory $DIR_NAME does not exist. Cloning repository..."
git clone "$REPO_URL"
fi

17
scripts/_setup_ruby-build.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# Define the repository URL and the directory name
REPO_URL="https://github.com/rbenv/ruby-build.git "
DIR_NAME="$HOME/.rbenv/plugins/ruby-build"
echo "=== Setting up ruby-build ==="
# Check if the directory exists
if [ -d "$DIR_NAME" ]; then
echo "Directory $DIR_NAME exists. Pulling latest changes..."
cd "$DIR_NAME"
git pull
else
echo "Directory $DIR_NAME does not exist. Cloning repository..."
git clone "$REPO_URL"
fi

0
scripts/macos_bootstrap.sh Normal file → Executable file
View File

5
scripts/setup_env_managers.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env -S bash -i
bash "$(dirname "$0")/_setup_pyenv.sh"
bash "$(dirname "$0")/_setup_rbenv.sh"
bash "$(dirname "$0")/_setup_ruby-build.sh"