runtime/build_ruby.sh
Adam Štrauch ed6ea70fa5
Some checks failed
Test build / build (push) Failing after 35m53s
A lot of new stuff
2024-08-13 19:59:45 +02:00

28 lines
638 B
Bash
Executable File

#!/bin/bash
set -e
VERSION=$1
mkdir -p /opt/techs
cd /usr/src
SUBVERSION=`echo $VERSION | cut -d "." -f 1`.`echo $VERSION | cut -d "." -f 2`
wget https://cache.ruby-lang.org/pub/ruby/$SUBVERSION/ruby-$VERSION.tar.gz
tar xf ruby-$VERSION.tar.gz
rm ruby-$VERSION.tar.gz
cd ruby-$VERSION
./configure --prefix=/opt/techs/ruby-$VERSION
make -j
make install
/opt/techs/ruby-${VERSION}/bin/gem update --system
/opt/techs/ruby-${VERSION}/bin/gem install passenger
git clone --depth 1 https://github.com/rbenv/rbenv.git /opt/techs/ruby-$VERSION/rbenv
ln -s /opt/techs/ruby-$VERSION/rbenv/libexec/rbenv /opt/techs/ruby-$VERSION/bin/rbenv