Skip to content

Commit

Permalink
Install texlive needed packages, and dont install texlive on front build
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhose committed May 12, 2015
1 parent 1e1bc6c commit 0f41f14
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 12 deletions.
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,19 @@ before_script:
- mv zds/settings_test.py zds/settings_prod.py

install:
# TexLive
- sed -i 's@\$HOME@'"$HOME"'@' texlive.profile
- wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
- tar -zxf install-tl*
- ./install-tl*/install-tl -profile texlive.profile
- export PATH=~/texlive/bin/x86_64-linux:$PATH

- |
if [[ "$TEST_APP" == *"back"* ]]
then
./scripts/install_texlive.sh
export PATH=~/.texlive/bin/x86_64-linux:$PATH
fi
# Add fonts
- mkdir -p ~/.fonts/truetype
- wget -P ~/.fonts/truetype https://www.dropbox.com/s/4vzkldw55iag546/Andale-Mono.ttf
- wget -P ~/.fonts/truetype https://www.dropbox.com/s/ema28tjn52960mq/Merriweather.zip
- unzip ~/.fonts/truetype/Merriweather.zip -d ~/.fonts/truetype/Merriweather/
- chmod a+r ~/.fonts/truetype/Merriweather/*.ttf
- chmod a+r ~/.fonts/truetype/Andale-Mono.ttf
- fc-cache -f -v

# Cabal + Pandoc stuff
Expand Down
23 changes: 23 additions & 0 deletions scripts/install_texlive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
#
# Install texlive to $HOME/.texlive

TEXLIVE_PROFILE=${BASH_SOURCE[0]/%install_texlive.sh/texlive.profile}

# Creating install dir
mkdir -p ~/.texlive/
cp $TEXLIVE_PROFILE ~/.texlive/
cd ~/.texlive/

# Replace correct paths in profile (needs absolute paths)
sed -i 's@\$HOME@'"$HOME"'@' texlive.profile

# Download and run installer
wget -O ./install-tl.tar.gz http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -zxf ./install-tl.tar.gz
./install-tl*/install-tl -profile texlive.profile

# Install extra latex packages
./bin/x86_64-linux/tlmgr install wallpaper titlesec

echo "Installation complete ! Don't forget to add ~/.texlive/bin/x86_64-linux to PATH"
9 changes: 4 additions & 5 deletions texlive.profile → scripts/texlive.profile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
# installation profile at installation time.
selected_scheme scheme-small
TEXMFCONFIG $TEXMFSYSCONFIG
TEXDIR $HOME/texlive
TEXMFLOCAL $HOME/texlive/texmf-local
TEXMFSYSCONFIG $HOME/texlive/texmf-config
TEXMFSYSVAR $HOME/texlive/texmf-var
TEXDIR $HOME/.texlive
TEXMFLOCAL $HOME/.texlive/texmf-local
TEXMFSYSCONFIG $HOME/.texlive/texmf-config
TEXMFSYSVAR $HOME/.texlive/texmf-var
TEXMFHOME $TEXMFLOCAL
TEXMFVAR $TEXMFSYSVAR
binary_x86_64-linux 1
collection-basic 1
collection-latex 1
collection-latexrecommended 1
collection-metapost 1
collection-xetex 1
in_place 0
option_adjustrepo 1
Expand Down

0 comments on commit 0f41f14

Please sign in to comment.