<commit_before>#!/bin/sh

APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+1] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'`
APP_PATH=`cd "$APP_PATH"; pwd`

# See if there is a cached version of TL available
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
if ! command -v lualatex > /dev/null; then
  # Obtain TeX Live
  wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
  tar -xzf install-tl-unx.tar.gz
  cd install-tl-20*

  echo "Installing using profile:"
  cat ${APP_PATH}/texlive.profile

  echo

  # Install a minimal system
  ./install-tl --profile="${APP_PATH}/texlive.profile"

  cd ..
fi

# Other contrib packages: done as a block to avoid multiple calls to tlmgr
# texlive-latex-base is needed to run pdflatex
tlmgr install   \
  exam          \
  amsfonts      \
  stmaryrd      \
  amsmath       \
  tools         \
  fontawesome   \
  luatextra     \
  minted        \
  graphics      \
  geometry      \
  fancyhdr      \
  pdfpages      \
  epstopdf      \
  colortbl      \
  lastpage      \
  hyperref

# Keep no backups (not required, simply makes cache bigger)
tlmgr option -- autobackup 0

# Update the TL install but add nothing new
tlmgr update --self --all --no-auto-install<commit_msg>CONFIG: Update package installs for texlive<commit_after>#!/bin/sh

APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+1] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'`
APP_PATH=`cd "$APP_PATH"; pwd`

# See if there is a cached version of TL available
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
if ! command -v lualatex > /dev/null; then
  # Obtain TeX Live
  wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
  tar -xzf install-tl-unx.tar.gz
  cd install-tl-20*

  echo "Installing using profile:"
  cat ${APP_PATH}/texlive.profile

  echo

  # Install a minimal system
  ./install-tl --profile="${APP_PATH}/texlive.profile"

  cd ..
fi

# Other contrib packages: done as a block to avoid multiple calls to tlmgr
# texlive-latex-base is needed to run pdflatex
tlmgr install   \
  fontawesome   \
  minted        \
  fvextra       \
  upquote       \
  ifplatform    \
  xstring       \
  framed        \
  lastpage

# Keep no backups (not required, simply makes cache bigger)
tlmgr option -- autobackup 0

# Update the TL install but add nothing new
tlmgr update --self --all --no-auto-install
{'fraction_non_alphanumeric': 0.13119415109666938, 'fraction_numerical': 0.008935824532900082, 'mean_word_length': 2.7205438066465257, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4525363', 'n_tokens_mistral': 897, 'n_tokens_neox': 867, 'n_words': 238}