1/* OS/2 rexx script to emulate the "cd dir; command" mechanism in make
2 * which does not work with stupid CMD.EXE
3 *
4 * $XFree86: xc/config/util/indir.cmd,v 3.1 1996/01/24 21:56:12 dawes Exp $
5 */
6curdir = directory()
7line = fixbadprefix(arg(1))
8new = directory(word(line,1))
9subword(line,2)
10old = directory(curdir)
11exit
12
13/* somehow make or cmd manages to convert a relative path ..\..\. to ..... */
14fixbadprefix:
15count = 1
16str = ARG(1)
17DO WHILE SUBSTR(str,count,2) = '..'
18   count = count+1
19   str = INSERT('\',str,count)
20   count = count+2
21END
22RETURN str
23
24