/* */

arg where

call directory where

'UNPACK2 OS2MPEG.IN_'

rspdir = ''
curdir = directory()
do i = 1 to length(curdir)
  ch = substr(curdir,i,1)
  if ch = '\' then rspdir = rspdir||'\'
  rspdir=rspdir||ch
end

rspfile = 'OS2MPEG.RSP'
'@del' rspfile '>NUL: 2>&1'

call lineout rspfile, 'MMINSTSOURCE = "'rspdir'"'
call lineout rspfile, 'MMINSTTARGET = "'left(value('MMBASE',,'OS2ENVIRONMENT'),2)'"'
call lineout rspfile, 'CHANGECONFIG = "N"'
call lineout rspfile, ' '
call lineout rspfile, 'MMINSTGROUPS ='
call lineout rspfile, '   ('
call lineout rspfile, '   GROUP.2 = "OpenMPEG Video=NUM=1,"'
call lineout rspfile, '   )'

call stream  rspfile, 'C', 'CLOSE'

'MINSTALL /R:'rspfile

'call MKVSDINI'

'cd ..'
'echo y | del' where '>NUL 2>&1'
'rd' where
