#!/bin/bash # Sometimes the cache directory gets confused and neither fonts nor some # images can be found. This corrects those issues by clearing out the # cache and assigning the appropriate ownership. sudo rm -rf /var/cache/context/texmf-cache sudo mkdir -p /var/cache/context/texmf-cache sudo chmod -R 777 /var/cache/context/texmf-cache export OSFONTDIR=/usr/local/share/fonts:/usr/share/fonts/type1/gsfonts source /home/context/bin/context/tex/setuptex > /dev/null 2>&1 mtxrun --generate mtxrun --script fonts --reload sudo chmod -R 777 /var/cache/context/texmf-cache sudo chown -R www-data.www-data /var/cache/context/texmf-cache