Drop force, allow (almost) everything to just reinstall/update

This commit is contained in:
David Heinemeier Hansson
2024-06-04 15:02:54 -07:00
parent f4f893d06a
commit 456e4d820b
11 changed files with 111 additions and 115 deletions

View File

@@ -1,9 +1,18 @@
if [ -n "$FORCE" ] || ! command -v rbenv &>/dev/null; then
# FIXME: Change to use whatever latest release is
DEFAULT_RUBY_VERSION="3.3.1"
# FIXME: Change to use whatever latest release is
DEFAULT_RUBY_VERSION="3.3.1"
sudo apt install -y rbenv
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
rbenv install $DEFAULT_RUBY_VERSION
rbenv global $DEFAULT_RUBY_VERSION
sudo apt install -y rbenv
RUBY_BUILD_DIR="$(rbenv root)/plugins/ruby-build"
# Check if the directory exists
if [ -d "$RUBY_BUILD_DIR" ]; then
cd "$RUBY_BUILD_DIR" && git pull
cd -
else
git clone https://github.com/rbenv/ruby-build.git "$RUBY_BUILD_DIR"
fi
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
rbenv install $DEFAULT_RUBY_VERSION
rbenv global $DEFAULT_RUBY_VERSION