Skip to content

Commit 4381bab

Browse files
committed
Include ruby-build
Install it if it doesn't exist If it's already installed, make sure to upgrade it by pulling the latest changes from the git repo
1 parent 23d6221 commit 4381bab

File tree

1 file changed

+10
-0
lines changed
  • root/etc/s6-overlay/s6-rc.d/init-mod-code-server-rbenv-install

1 file changed

+10
-0
lines changed

root/etc/s6-overlay/s6-rc.d/init-mod-code-server-rbenv-install/run

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ else
1111
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
1212
fi
1313

14+
if [ -d ~/.rbenv/plugins/ruby-build ]; then
15+
echo 'ruby-build plugin already cloned, skipping'
16+
17+
echo 'Upgrading ruby-build plugin'
18+
git -C ~/.rbenv/plugins/ruby-build pull
19+
else
20+
echo 'Cloning ruby-build plugin repo'
21+
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
22+
fi
23+
1424
# This will add `eval "$(~/.rbenv/bin/rbenv init - --no-rehash bash)"` to the ~/.bashrc or ~/.bash_profile file
1525
echo 'Initializing rbenv for bash'
1626
~/.rbenv/bin/rbenv init

0 commit comments

Comments
 (0)