summaryrefslogtreecommitdiff
path: root/libre/texlive-bin-libre/texlive.install
blob: b8585012349c6c65d98a3cf2d407547bea4fde5a (plain)
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
infodir=usr/share/info
filelist=(dvipng.info dvips.info eplain.info epspdf.info fontname.info kpathsea.info latex2e-es.info latex2e.info latex2man.info mf2pt1.info tds.info texdraw.info web2c.info)

post_install() {
  echo    ">>> texlive: updating the filename database..."
  usr/bin/mktexlsr
  echo -n   "creating all formats..."
  usr/bin/fmtutil-sys --all 1>/dev/null
  echo      " done." 
  echo      " (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)"

  [[ -x usr/bin/install-info ]] || return 0
  for file in "${filelist[@]}"; do
    install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
  done
}

post_upgrade() {
  echo    ">>> texlive: updating the filename database..."
  usr/bin/mktexlsr
  echo -n   "recreating all formats..."
  usr/bin/fmtutil-sys --all 1>/dev/null
  echo      " done." 
  echo      " (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)"

  [[ -x usr/bin/install-info ]] || return 0
  for file in "${filelist[@]}"; do
    install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
  done
}

pre_remove() {
  [[ -x usr/bin/install-info ]] || return 0
  for file in "${filelist[@]}"; do
    install-info --delete "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
  done
}