]> git.sesse.net Git - rdpsrv/blobdiff - Xserver/config/util/indir.cmd
Import X server from vnc-3.3.7.
[rdpsrv] / Xserver / config / util / indir.cmd
diff --git a/Xserver/config/util/indir.cmd b/Xserver/config/util/indir.cmd
new file mode 100644 (file)
index 0000000..7120274
--- /dev/null
@@ -0,0 +1,23 @@
+/* OS/2 rexx script to emulate the "cd dir; command" mechanism in make
+ * which does not work with stupid CMD.EXE
+ *
+ * $XFree86: xc/config/util/indir.cmd,v 3.1 1996/01/24 21:56:12 dawes Exp $
+ */
+curdir = directory()
+line = fixbadprefix(arg(1))
+new = directory(word(line,1))
+subword(line,2)
+old = directory(curdir)
+exit
+
+/* somehow make or cmd manages to convert a relative path ..\..\. to ..... */
+fixbadprefix:
+count = 1
+str = ARG(1)
+DO WHILE SUBSTR(str,count,2) = '..'
+   count = count+1
+   str = INSERT('\',str,count)
+   count = count+2
+END
+RETURN str
+