aboutsummaryrefslogtreecommitdiff
path: root/share/hoarder/grab-site/unix/linux/debian/install
blob: fda076235e382d35decfc24ab54773898c8b0425 (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
28
29
30
#!/usr/bin/env sh
#
# Install grab-site
#

# Parameters
SHARE="$1"
LIB="$2"

# Include basic functions
. $LIB/trashman/functions || exit 1
. $LIB/trashman/debian    || exit 1

# Requirements
trashman_apt_install git build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev libxml2-dev libxslt1-dev libre2-dev pkg-config

# Install pyenv
hoarder install pyenv || exit 1

# Install python and create venv
mkdir -p $HOME/.local/share
$HOME/.pyenv/bin/pyenv install 3.7.8 || exit 1
$HOME/.pyenv/versions/3.7.8/bin/python -m venv $HOME/.local/share/grab-site-venv || exit 1

# Install grab-site
$HOME/.local/share/grab-site-venv/bin/pip install --no-binary lxml --upgrade git+https://github.com/ArchiveTeam/grab-site || exit 1

echo "Add this to your ~/.bashrc or ~/.zshrc and then restart your shell (e.g. by opening a new terminal tab/window):"
echo ""
echo 'PATH="$PATH:'$HOME/.local/share/grab-site-venv/bin'"'