summaryrefslogtreecommitdiff
path: root/obsolete/systems/os2/emtex-contrib/emtexTDS/fix008/fix008.cmd
blob: ee99b80b258979317cde7baf122e6fe9bd9c4ff4 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* REXX */

/* emTeX/TDS fix # 008 installation script */
FIXNO = "008"
FIXVER = 0.56


/* loading the library */
ret = RxFuncAdd("SysLoadFuncs", "REXXUTIL", "SysLoadFuncs")
call SysLoadFuncs

/* Fixpak file name */
fixpak = "fix" || FIXNO || ".zip"

/* TeX drive */
texdrive = substr(value("EMTEXDIR", , "OS2ENVIRONMENT"),1,1)
if texdrive = "" then do
   say "The environment variable EMTEXDIR is undefined,"
   say "so I don't know what to fix."
   say "Are you sure that you have installed emTeX/TDS ?"
   exit
end

/* checking the version*/
version =  SysIni(texdrive||":\texmf\emtex\data\EMTEXTDS.INI", "EMTEXTDS", "VERSION")
if version <> FIXVER then do
   say "This fix can only be applied to emTeX/TDS, version " || FIXVER || "."
   exit
end

/* checking existence of fixpak file */
if  stream(fixpak, "C", "QUERY EXISTS") = "" then do
   say "I cannot find the file " || fixpak || " in the current directory!"
   exit
end

say "Fixing emTeX/TDS on drive" texdrive || ":"

/* directories */ 
call setlocal
tempdir = directory()
call directory(texdrive||":\texmf")

/* unzip fixpak */
ret=value("UNZIP", "-qqo", "OS2ENVIRONMENT")
"unzip " || tempdir || "\" || fixpak


/* =============================================================== */

/* delete junk files */
call SysFileDelete("fonts\source\public\cm\cmex9.mf")
call SysFileDelete("tex\latex\base\latexbug.msg")
call SysFileDelete("tex\latex\base\latex.log.new")
call SysFileDelete("doc\fonts\cm\bakoma-cm.fonts")
"erase fonts\type1\bakoma\cm\* /N"
"rmdir fonts\type1\bakoma\cm"
"rmdir fonts\type1\bakoma"

/* =============================================================== */

call endlocal

say
call makelatex
call makeplaintex
call makemf

say
say "Finis!"

/* finis */