home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / os2tex_3.zip / disk6.zip / disk_6 / komascr.cmd < prev    next >
OS/2 REXX Batch file  |  1997-12-29  |  3KB  |  147 lines

  1. /**/
  2.  
  3. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  4. call SysLoadFuncs
  5.  
  6.  
  7. parse arg language texmf source options
  8.  
  9.  
  10. if language = '049' then do
  11.  
  12.   msg.1 = 'msg:Koma-Script'
  13.   msg.2 = 'msg:Koma-Script: Entpacke Dateien'
  14.   msg.3 = 'msg:Koma-Script: komascr.ins'
  15.   msg.4 = 'msg:Koma-Script: amsclass.ins'
  16.   msg.5 = 'msg:Koma-Script: amsldoc.tex sortiere Index amsldoc.idx'
  17.   msg.6 = 'msg:Koma-Script: amsldoc.tex Lauf'
  18.   msg.7 = 'von'
  19.  
  20. end
  21. else do
  22.  
  23.   msg.1 = 'msg:Koma-Script'
  24.   msg.2 = 'msg:Koma-Script: installing files'
  25.   msg.3 = 'msg:Koma-Script: komascr.ins'
  26.   msg.4 = 'msg:Koma-Script: amsclass.ins'
  27.   msg.5 = 'msg:Koma-Script: amsldoc.tex sorting index amsldoc.idx'
  28.   msg.6 = 'msg:Koma-Script: amsldoc.tex run'
  29.   msg.7 = 'of'
  30.  
  31. end
  32.  
  33. install = texmf||'\os2tex\install'
  34.  
  35.  
  36. target = texmf||'\tex\latex\koma-script'
  37.  
  38.  
  39. if ""=directory(texmf||'\tex\latex') then do
  40.   say "err:Verzeichniswechsel nicht möglich!"
  41.   exit 1
  42. end
  43.  
  44.  
  45. if Pos("InstallFiles", options) > 0 then do
  46.  
  47.    say msg.1
  48.  
  49.    install||'\kdir '||texmf||'\tex\latex\koma-script'
  50.    install||'\kdir '||texmf||'\doc\latex\koma-script'
  51.  
  52.  
  53.    'md '||texmf||'\doc'
  54.    'md '||texmf||'\doc\latex'
  55.    'md '||texmf||'\doc\latex\koma-script'
  56.  
  57.  
  58.  
  59.    say msg.2
  60.  
  61.    install||'\unzip '||source||'\komascr.zip'
  62.  
  63.  
  64.  
  65.    tex = texmf||'\os2tex\bin\tex.exe'
  66.  
  67.  
  68.  
  69.    "copy "target"\*.tex "texmf"\doc\latex\koma-script"
  70.    "del "target"\*.tex"
  71.    "copy "target"\*.ps "texmf"\doc\latex\koma-script"
  72.    "del "target"\*.ps"
  73.    "copy "target"\*.dvi "texmf"\doc\latex\koma-script"
  74.    "del "target"\*.dvi"
  75.    "copy "target"\*.txt "texmf"\doc\latex\koma-script"
  76.    "del "target"\*.txt"
  77.  
  78.  
  79.    say msg.3
  80.  
  81.    tex||' -r -ff latex.fmt -pf '||texmf||'\os2tex\bin -pi '||texmf||'\tex; -po '||target||' komascr.ins'
  82.  
  83.  
  84. end
  85.  
  86.  
  87. if SysOS2Ver() = '2.30' then
  88.   top = 48
  89. else
  90.   top = 45
  91.  
  92.  
  93.  
  94. /*
  95. do i=1 to 3
  96.  
  97.   if i=3 then do
  98.     say msg.5
  99.     texmf||'\os2tex\bin\makeindex '||texmf||'\doc\ams\amslatex\amsldoc.idx'
  100.   end
  101.  
  102.   say msg.6' 'i' 'msg.7' 3'
  103.   tex||' -r -ff latex.fmt -pf '||texmf||'\os2tex\bin -pi '||texmf||'\tex;'||texmf||'\doc\ams -po '||texmf||'\doc\ams\amslatex -pt '||texmf||'\fonts\tfm amsldoc.tex'
  104.  
  105. end
  106. */
  107.  
  108.  
  109.  
  110.  
  111. if Pos("CreateObjects", options) > 0 then do
  112.  
  113.    classname = 'WPProgram'
  114.  
  115.    if language = '049' then do
  116.       objtitle  = 'koma script [M. Kohm]'
  117.       objfile   = 'scrguide.dvi'
  118.    end
  119.    else do
  120.       objtitle  = 'koma script [M. Kohm]'
  121.       objfile   = 'screnggu.dvi'
  122.    end
  123.  
  124.    location  = '<OS2TEX_MISC_FOLDER>'
  125.    setup     = 'EXENAME='texmf'\os2tex\bin\dvi.exe;PROGTYPE=PM;STARTUPDIR='texmf'\os2tex\bin;OBJECTID=<OS2TEX_koma_scrguide.dvi>;PARAMETERS='texmf'\doc\latex\koma-script\'objfile
  126.    duplicate = 'replace'
  127.  
  128.    rc = SysCreateObject(classname,objtitle,location,setup,duplicate)
  129.  
  130.    if rc = 0 then do
  131.       exit 1
  132.    end
  133.  
  134.  
  135. end
  136.  
  137.  
  138.  
  139.  
  140. if Pos("InstallFiles", options) > 0 then do
  141.  
  142.    "del "target"\*.ins"
  143.    "del "target"\*.dtx"
  144.  
  145. end
  146.  
  147.