]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/windows/post-miktex.sh
patch::: 1.3.149.jcn1
[lilypond.git] / Documentation / windows / post-miktex.sh
1 #!@SHELL@
2 # /etc/profile.d/post-miktex.sh -- Setup MiKTeX
3
4
5 # Educated guess in case we have no regtool
6 a="//c/Program Files/MiKTeX"
7
8 # Registry entry
9 reg="$(regtool -q get 'HKLM\Software\MiK\MiKTeX\CurrentVersion\MiKTeX\Install Root\')"
10 b="$(cygpath -u ""$reg"")"
11
12 # Where we installed it
13 c=texmf="/usr/windows/MiKTeX"
14
15 for i in "$a" "$b" "$c"; do
16         if [ -d "$i" ]; then
17                 texmf="$i"
18         fi
19 done
20
21 rm -f /usr/share/texmf
22 ln -s "$texmf" /usr/share/texmf
23
24 # What's in the registry
25 # $ regtool -s set 'HKLM\Software\MiK\MiKTeX\CurrentVersion\MiKTeX\Install Root\' "C:\cygwin\usr\windows\MiKTeX"
26
27 # regtool -v list HKLM\Software\MiK\MiKTeX\CurrentVersion\MiKTeX
28 # TEXMF Root Directories = "C:\cygwin\usr\windows\miktex\spool\texmf;C:\cygwin\windows\MiKTeX"
29 # Install Root = "C:\cygwin\usr\windows\MiKTeX"
30