[Swift-commit] r7940 - branches/release-0.95/libexec
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Thu Jul 3 21:18:49 CDT 2014
Author: hategan
Date: 2014-07-03 21:18:49 -0500 (Thu, 03 Jul 2014)
New Revision: 7940
Modified:
branches/release-0.95/libexec/_swiftwrap.vbs
Log:
removed remaining references to kickstart from _swiftwrap.vbs
Modified: branches/release-0.95/libexec/_swiftwrap.vbs
===================================================================
--- branches/release-0.95/libexec/_swiftwrap.vbs 2014-07-04 02:03:57 UTC (rev 7939)
+++ branches/release-0.95/libexec/_swiftwrap.vbs 2014-07-04 02:18:49 UTC (rev 7940)
@@ -222,7 +222,6 @@
log "INF=" + INF
log "OUTF=" + OUTF
log "STATUSMODE=" + STATUSMODE
-log "KICKSTART=" + KICKSTART
log "ARGS=" + Join(ARGS)
logstate "CREATE_JOBDIR"
@@ -268,62 +267,58 @@
End If
End If
-If KICKSTART = "" Then
- Set min = Nothing
- Set mout = Nothing
- Set merr = Nothing
- If STDIN <> "" Then
- Set min = fs.OpenTextFile(STDIN, 1, False)
- End If
- If STDOUT <> "" Then
- Set mout = fs.OpenTextFile(STDOUT, 2, True)
- End If
- If STDERR <> "" Then
- Set merr = fs.OpenTextFile(STDERR, 2, True)
- End If
- qargs = prepareArgs(ARGS)
- log "Cmd: " + prepareOne(EXEC) + " " + qargs
- Set p = shell.exec(prepareOne(EXEC) + " " + qargs)
- log "Executable started"
+Set min = Nothing
+Set mout = Nothing
+Set merr = Nothing
+If STDIN <> "" Then
+ Set min = fs.OpenTextFile(STDIN, 1, False)
+End If
+If STDOUT <> "" Then
+ Set mout = fs.OpenTextFile(STDOUT, 2, True)
+End If
+If STDERR <> "" Then
+ Set merr = fs.OpenTextFile(STDERR, 2, True)
+End If
+qargs = prepareArgs(ARGS)
+log "Cmd: " + prepareOne(EXEC) + " " + qargs
+Set p = shell.exec(prepareOne(EXEC) + " " + qargs)
+log "Executable started"
- Do Until p.StdOut.AtEndOfStream and p.StdErr.AtEndOfStream and p.Status <> 0
- some = False
- If Not min Is Nothing Then
- l = min.ReadLine
- p.StdIn.Write(l)
- some = True
- End If
- If Not p.StdOut.AtEndOfStream Then
- l = p.StdOut.ReadLine
- If Not mout Is Nothing Then
- mout.Write(l)
- End If
- some = True
- End If
- If Not p.StdErr.AtEndOfStream Then
- l = p.StdErr.ReadLine
- If Not merr Is Nothing Then
- merr.Write(l)
- End If
- some = True
- End If
- WScript.Sleep(100)
- Loop
+Do Until p.StdOut.AtEndOfStream and p.StdErr.AtEndOfStream and p.Status <> 0
+ some = False
If Not min Is Nothing Then
- min.close()
+ l = min.ReadLine
+ p.StdIn.Write(l)
+ some = True
End If
- If Not mout Is Nothing Then
- mout.close()
+ If Not p.StdOut.AtEndOfStream Then
+ l = p.StdOut.ReadLine
+ If Not mout Is Nothing Then
+ mout.Write(l)
+ End If
+ some = True
End If
- If Not merr Is Nothing Then
- merr.close()
+ If Not p.StdErr.AtEndOfStream Then
+ l = p.StdErr.ReadLine
+ If Not merr Is Nothing Then
+ merr.Write(l)
+ End If
+ some = True
End If
- If p.ExitCode <> 0 Then
- fail "Exit code " + CStr(p.ExitCode), p.ExitCode
- End If
-Else
- fail "Kickstart is not supported on Windows", 250
+ WScript.Sleep(100)
+Loop
+If Not min Is Nothing Then
+ min.close()
End If
+If Not mout Is Nothing Then
+ mout.close()
+End If
+If Not merr Is Nothing Then
+ merr.close()
+End If
+If p.ExitCode <> 0 Then
+ fail "Exit code " + CStr(p.ExitCode), p.ExitCode
+End If
shell.CurrentDirectory = WFDIR
More information about the Swift-commit
mailing list