aboutsummaryrefslogtreecommitdiff
path: root/scripts/provision
blob: 0d7c65d314ea39e4994562e6e4f572c5f7f1c728 (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
27
#!/bin/bash
#
# Provisioner
#

# Parameters
DIRNAME="`dirname $0`"

# Basic dependencies
DEPENDENCIES="mkdocs python3-pip pandoc"

# PyPI dependencies
DEPENDENCIES_PIP="mkdocs-bibtex mkdocs-material mkdocs-awesome-pages-plugin mkdocs-static-i18n mkdocs-macros-plugin"

# Check for sudo
if [ "`whoami`" != "root" ]; then
  SUDO="sudo"
fi

# Ensure an up-to-date system
$SUDO apt-get update && $SUDO apt-get dist-upgrade -y && $SUDO apt-get autoremove -y && $SUDO apt-get clean

# Install dependencies
$SUDO apt install -y $DEPENDENCIES

# Install python dependencies
pip3 install --break-system-packages $DEPENDENCIES_PIP