diff --git a/scripts/_setup_pyenv.sh b/scripts/_setup_pyenv.sh new file mode 100755 index 0000000..d774a31 --- /dev/null +++ b/scripts/_setup_pyenv.sh @@ -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 \ No newline at end of file diff --git a/scripts/_setup_rbenv.sh b/scripts/_setup_rbenv.sh new file mode 100755 index 0000000..f2c39b0 --- /dev/null +++ b/scripts/_setup_rbenv.sh @@ -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 \ No newline at end of file diff --git a/scripts/_setup_ruby-build.sh b/scripts/_setup_ruby-build.sh new file mode 100755 index 0000000..df46119 --- /dev/null +++ b/scripts/_setup_ruby-build.sh @@ -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 \ No newline at end of file diff --git a/scripts/macos_bootstrap.sh b/scripts/macos_bootstrap.sh old mode 100644 new mode 100755 diff --git a/scripts/setup_env_managers.sh b/scripts/setup_env_managers.sh new file mode 100755 index 0000000..f76f54b --- /dev/null +++ b/scripts/setup_env_managers.sh @@ -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"