-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.sh
executable file
·67 lines (57 loc) · 1.61 KB
/
setup.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
#!/bin/sh
# Shell script to install the necessary packages to get LaTeX working with the
# Tufte-LaTeX package on Fedora. (Tested on F15.)
install_src() {
echo "This may take some time..."
[ -d install ] || mkdir install
cd install
install_pkg=install-tl-unx.tar.gz
[ -e $install_pkg ] || wget http://mirror.ctan.org/systems/texlive/tlnet/$install_pkg
profile=profile
if [ ! -e $profile ]; then
cat >$profile <<EOF
TEXDIR /usr/local/texlive/2011
TEXMFCONFIG ~/.texlive2011/texmf-config
TEXMFHOME ~/texmf
TEXMFLOCAL /usr/local/texlive/texmf-local
TEXMFSYSCONFIG /usr/local/texlive/2011/texmf-config
TEXMFSYSVAR /usr/local/texlive/2011/texmf-var
TEXMFVAR ~/.texlive2011/texmf-var
binary_x86_64-linux 1
collection-basic 1
collection-fontsrecommended 1
collection-genericrecommended 1
collection-latex 1
collection-latexrecommended 1
in_place 0
option_autobackup 1
option_backupdir tlpkg/backups
option_desktop_integration 1
option_doc 1
option_file_assocs 1
option_fmt 1
option_letter 0
option_path 1
option_post_code 1
option_src 1
option_sys_bin /usr/local/bin
option_sys_info /usr/local/info
option_sys_man /usr/local/man
option_w32_multi_user 0
option_write18_restricted 1
portable 0
EOF
directory=`tar -tzf $install_pkg | head -n 1`
[ -d $directory ] || tar -xzf $install_pkg
sudo $directory/install-tl -profile $profile
fi
sudo /usr/local/bin/tlmgr install tufte-latex titlesec soul
}
install_rpm() {
sudo yum install texlive-latex-bin texlive-texconfig texlive texlive-tufte-latex texlive-titlesec
}
if which yum >/dev/null && yum info texlive >/dev/null 2>/dev/null; then
install_rpm
else
install_src
fi