2020-03-12 10:22:23 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-03-13 06:55:03 -05:00
|
|
|
if [ "$EUID" -ne 0 ]
|
|
|
|
then echo "This script must be run as root"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-07-21 09:48:59 -05:00
|
|
|
echo "Running apt update..."
|
|
|
|
apt update
|
|
|
|
|
2020-03-13 06:55:03 -05:00
|
|
|
echo "Installing system pre-requisites..."
|
2020-06-02 06:33:57 -05:00
|
|
|
apt install -y curl apt-transport-https ca-certificates gnupg
|
2020-03-13 06:55:03 -05:00
|
|
|
|
|
|
|
echo "Removing yarn (which may not be the package we expect)..."
|
|
|
|
dpkg -r yarn
|
|
|
|
|
2020-06-02 06:33:57 -05:00
|
|
|
# PostgreSQL
|
|
|
|
echo "Setting up the PostgreSQL repo..."
|
|
|
|
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
|
|
|
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
|
|
|
|
2020-03-13 06:55:03 -05:00
|
|
|
# Node repo
|
|
|
|
echo "Setting up the NodeJS repo..."
|
2022-08-10 04:27:40 -05:00
|
|
|
curl -sL https://deb.nodesource.com/setup_16.x | bash -
|
2020-03-12 10:22:23 -05:00
|
|
|
|
|
|
|
# Yarn repo
|
2020-03-13 06:55:03 -05:00
|
|
|
echo "Setting up the Yarn repo..."
|
|
|
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
|
|
|
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
2020-03-12 10:22:23 -05:00
|
|
|
|
2020-03-13 06:55:03 -05:00
|
|
|
echo "Running apt update..."
|
|
|
|
apt update
|
2020-03-12 10:22:23 -05:00
|
|
|
|
|
|
|
# Install pre-reqs
|
2020-03-13 06:55:03 -05:00
|
|
|
echo "Installing build pre-requisites..."
|
2023-03-27 07:38:02 -05:00
|
|
|
apt install -y build-essential python3-dev python3-venv python3-sphinx python3-wheel python3-pip libpq-dev libffi-dev nodejs yarn libkrb5-dev
|
|
|
|
python3 -m pip install sphinxcontrib-youtube
|