AbstractOperatingSystem.st
branchjv
changeset 20728 83c74234945e
parent 20727 fb8c5591428b
parent 20676 152dbea0d6d2
child 21024 8734987eb5c7
--- a/AbstractOperatingSystem.st	Tue Oct 25 12:31:42 2016 +0100
+++ b/AbstractOperatingSystem.st	Tue Oct 25 12:35:02 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
@@ -1302,6 +1304,29 @@
     "Modified: / 10.11.1998 / 20:54:37 / cg"
 !
 
+executeCommand:aCommandString inDirectory:aDirectory showWindow:showWindow
+    "execute the unix command specified by the argument, aCommandString.
+     If aCommandString is a String, the commandString is passed to a shell for execution
+     - see the description of 'sh -c' in your UNIX manual ('cmd.com' in your MSDOS manual).
+     If aCommandString is an Array, the first element is the command to be executed,
+     and the other elements are the arguments to the command. No shell is invoked in this case.
+     Return true if successful, false otherwise."
+
+    ^ self
+        executeCommand:aCommandString
+        inputFrom:nil
+        outputTo:nil
+        errorTo:nil
+        auxFrom:nil
+        environment:nil
+        inDirectory:aDirectory
+        lineWise:false
+        showWindow:showWindow
+        onError:[:exitStatus| false]
+
+    "Created: / 18-10-2016 / 15:55:29 / cg"
+!
+
 executeCommand:aCommandString inputFrom:anInStream outputTo:anOutStream errorTo:anErrStream
     "execute the unix command specified by the argument, aCommandString.
      If aCommandString is a String, the commandString is passed to a shell for execution