-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision.sh
79 lines (59 loc) · 1.8 KB
/
provision.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#
# Texlive guide
# http://www.fugenji.org/~thomas/texlive-guide/
#
echo "Installing rsync"
yum -y install rsync >> /dev/null
echo "Installing perl"
yum -y install perl >> /dev/null
sudo yum -y install perl-Digest-MD5 >> /dev/null
echo "Installing expect"
yum -y install expect >> /dev/null
echo "Installing ImageMagick"
yum -y install ImageMagick >> /dev/null
#
# install Texlive for Linux
# https://texwiki.texjp.org/?TeX%20Live#v9c33c6a
#
if [ ! -e 'install-tl-unx.tar.gz' ]; then
echo "Downloading Texlive installer"
rsync -r rsync://ftp.jaist.ac.jp/pub/CTAN/systems/texlive/tlnet/install-tl-unx.tar.gz .
tar xvzf install-tl-unx.tar.gz >> /dev/null
fi
#
# install-tl : TeX Live cross-platform installer
# https://www.tug.org/texlive/doc/install-tl.html
#
if [ ! -e '/usr/local/texlive/' ]; then
# ex: install-tl-20161115
cd install-tl-*
echo "Installing Texlive. Take about 30 minutes."
expect -c "
set timeout -1
spawn ./install-tl
expect \"Enter command:\"
send \"I\r\"
expect \"Time used for installing the packages:\"
send \"exit 1\"
"
cd /usr/local/texlive/20*/
TEX_PATH=$(pwd)
echo "export TEX_PATH=${TEX_PATH}" >> /etc/profile
echo "export PATH=${TEX_PATH}/bin/x86_64-linux/:$PATH" >> /etc/profile
source /etc/profile
mktexlsr >> /dev/null
#
# tlmgr: package repository ftp://ftp.u-aizu.ac.jp/pub/tex/CTAN/systems/texlive/tlnet (verified)
# tlmgr: backupdir as set in tlpdb
# /usr/local/texlive/20**/tlpkg/backups
# is not a directory.
#
mkdir -p ${TEX_PATH}/tlpkg/backups
chmod a+w ${TEX_PATH}/tlpkg
chmod a+w ${TEX_PATH}/tlpkg/backups
fi
echo "Setting tlmgr repository"
tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet >> /dev/null
echo "Updating tlmgr"
tlmgr update --self --all >> /dev/null
echo "Finished!"