17 lines
447 B
Bash
Executable File
17 lines
447 B
Bash
Executable File
#!/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 |