summaryrefslogtreecommitdiff
path: root/config/install.sh
blob: 554188c4d3e0a1adda1f6f57edd6663b6e9b8da5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
set -euxo pipefail

export DEBIAN_FRONTEND=noninteractive

apt-get clean
apt-get update -q
apt-get install -y wget apt-utils libedit2 git
apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev

cd /root
wget https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.1.tar.gz
tar -xf ruby-2.7.1.tar.gz
cd ruby-2.7.1
./configure --prefix=/opt/ruby --disable-install-doc --disable-install-rdoc --disable-install-capi --disable-dln --with-static-linked-ext --without-valgrind --disable-jit-support --disable-rubygems
make -j"$(nproc)"
make install
rm -r /opt/ruby/share

cd /root
wget https://rubygems.org/rubygems/rubygems-3.1.2.tgz
tar -xf rubygems-3.1.2.tgz
cd rubygems-3.1.2
ruby setup.rb
gem install spandx
echo "Done"