-
Notifications
You must be signed in to change notification settings - Fork 4
/
texlive.sh
executable file
·82 lines (79 loc) · 1.91 KB
/
texlive.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
80
81
82
#!/bin/bash
TARGET_DIR=$PWD/.texlive
PROFILE=$PWD/.texlive.profile
PROFILE_OLD=$TARGET_DIR/.texlive.profile
cat > $PROFILE <<EOF
selected_scheme scheme-custom
TEXDIR $TARGET_DIR
TEXMFCONFIG $TEXMFSYSCONFIG
TEXMFHOME $TEXMFLOCAL
TEXMFLOCAL $TARGET_DIR/texmf-local
TEXMFSYSCONFIG $TARGET_DIR/texmf-config
TEXMFSYSVAR $TARGET_DIR/texmf-var
TEXMFVAR $TEXMFSYSVAR
binary_x86_64-darwin 0
binary_x86_64-linux 1
collection-basic 1
collection-bibtexextra 1
collection-binextra 1
collection-context 1
collection-fontsextra 1
collection-fontsrecommended 1
collection-fontutils 1
collection-formatsextra 1
collection-games 1
collection-genericextra 1
collection-genericrecommended 1
collection-htmlxml 1
collection-humanities 1
collection-langenglish 1
collection-langeuropean 1
collection-latex 1
collection-latexextra 1
collection-latexrecommended 1
collection-luatex 1
collection-mathextra 1
collection-metapost 1
collection-music 1
collection-omega 1
collection-pictures 1
collection-plainextra 1
collection-pstricks 1
collection-publishers 1
collection-science 1
collection-texworks 1
collection-xetex 1
option_adjustrepo 1
option_autobackup 0
option_desktop_integration 0
option_doc 0
option_file_assocs 0
option_fmt 1
option_letter 0
option_menu_integration 0
option_path 0
option_post_code 1
option_src 0
option_sys_bin /usr/local/bin
option_sys_info /usr/local/share/info
option_sys_man /usr/local/share/man
option_w32_multi_user 0
option_write18_restricted 1
portable 1
EOF
result=$(diff $PROFILE $PROFILE_OLD)
if [ $? != 0 ]
then
rm -rf $TARGET_DIR
curl -LO http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar xzvf install-tl-unx.tar.gz
cd install*
./install-tl -profile $PROFILE
cp $PROFILE $PROFILE_OLD
cd ..
fi
export PATH=$TARGET_DIR/bin/x86_64-linux:$PATH
export TEXDIR=$TARGET_DIR
export TEXMFLOCAL=$TARGET_DIR/texmf-local
export TEXMFSYSCONFIG=$TARGET_DIR/texmf-config
export TEXMFSYSVAR=$TARGET_DIR/texmf-var