-
-
-# we receive our options as a list, but we will be passing them to the shell as a line
-# this means we have to requote things as they will get one round of unquoting.
-# we can't set "shell=False" because we are running commands from the PATH and
-# if you don't use the shell you don't get a PATH search.
-def main(argv):
-
- # use 1st argument as name of tool to call
- Command = pipes.quote(sys.argv[1]);
-
- ExceptionList = ["/interwork"]
-
- for arg in argv:
- if arg.find('/') == -1:
- # if we don't need to convert just add to the command line
- Command = Command + ' ' + pipes.quote(arg)
- elif arg in ExceptionList:
- # if it is in the list, then don't do a cygpath
- # assembler stuff after --apcs has the /.
- Command = Command + ' ' + pipes.quote(arg)
- else:
- if ((arg[0] == '-') and (arg[1] == 'I' or arg[1] == 'i')):
- CygPath = arg[0] + arg[1] + ConvertCygPathToDos(arg[2:])
- else:
- CygPath = ConvertCygPathToDos(arg)
-
- Command = Command + ' ' + pipes.quote(CygPath)
-
- # call the real tool with the converted paths
- return subprocess.call(Command, shell=True)
-
-
-if __name__ == "__main__":
- try:
- ret = main(sys.argv[2:])
-
- except:
+\r
+\r
+# we receive our options as a list, but we will be passing them to the shell as a line\r
+# this means we have to requote things as they will get one round of unquoting.\r
+# we can't set "shell=False" because we are running commands from the PATH and\r
+# if you don't use the shell you don't get a PATH search.\r
+def main(argv):\r
+\r
+ # use 1st argument as name of tool to call\r
+ Command = pipes.quote(sys.argv[1]);\r
+\r
+ ExceptionList = ["/interwork"]\r
+\r
+ for arg in argv:\r
+ if arg.find('/') == -1:\r
+ # if we don't need to convert just add to the command line\r
+ Command = Command + ' ' + pipes.quote(arg)\r
+ elif arg in ExceptionList:\r
+ # if it is in the list, then don't do a cygpath\r
+ # assembler stuff after --apcs has the /.\r
+ Command = Command + ' ' + pipes.quote(arg)\r
+ else:\r
+ if ((arg[0] == '-') and (arg[1] == 'I' or arg[1] == 'i')):\r
+ CygPath = arg[0] + arg[1] + ConvertCygPathToDos(arg[2:])\r
+ else:\r
+ CygPath = ConvertCygPathToDos(arg)\r
+\r
+ Command = Command + ' ' + pipes.quote(CygPath)\r
+\r
+ # call the real tool with the converted paths\r
+ return subprocess.call(Command, shell=True)\r
+\r
+\r
+if __name__ == "__main__":\r
+ try:\r
+ ret = main(sys.argv[2:])\r
+\r
+ except:\r