-
-
Notifications
You must be signed in to change notification settings - Fork 992
/
ubuntu.sh
executable file
·61 lines (42 loc) · 1.61 KB
/
ubuntu.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
if [[ $# -ne 4 ]]; then
echo "Illegal number of parameters"
exit 2
fi
start=$(date +%s)
ctan_url=$1
download_dir=$2
venv_dir=$3
project_dir=$4
echo "Install TeX Live (basic scheme)"
mkdir -p $download_dir
cd $download_dir
wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xzvf install-tl-unx.tar.gz
cd install-tl-*/
export TEXLIVE_INSTALL_PREFIX=$HOME/texlive
export TEXLIVE_INSTALL_TEXDIR=$HOME/texlive
perl install-tl -scheme scheme-basic -portable -no-interaction -repository $ctan_url/systems/texlive/tlnet/
echo -e '\n#texlive\nexport PATH="$PATH:$HOME/texlive/bin/x86_64-linux"\n' >> ~/.bashrc
source ~/.bashrc
echo "Install additional TeX Live packages"
tlmgr install -repository $ctan_url/systems/texlive/tlnet/ latexmk ean13isbn ean ocr-b helvetic enumitem units emptypage biblatex quoting titlesec tocloft mdframed zref needspace biber xetex xcolor pdfpages hologo float pgf parskip fontspec microtype listings caption booktabs pdflscape
echo "Update OS package sources info"
sudo apt-get update
echo "Create virtual environment"
sudo apt-get -y install python3-pip python3-venv
mkdir -p $venv_dir
python3 -m venv $venv_dir/scientific-visualization-book
source $venv_dir/bin/activate
python3 -m pip install --upgrade pip setuptools wheel
pip install docutils==0.17
echo "Clone the repository"
sudo apt-get -y install git
mkdir -p $project_dir
cd $project_dir
git clone https://github.com/rougier/scientific-visualization-book
cd scientific-visualization-book
echo "Build the book"
make clean && make all
end=$(date +%s)
echo "Elapsed Time: $(($end-$start)) seconds"