Update README with new package name (#12)
Easily execute system commands from a Swift script or command line tool.
Features
Running child processes in Swift is not hard with Process, but it can be a bit tedious and repetitive.
Process
System makes this task extremely easy. If you are familiar with Ruby scripting (Rakefile, Fastlane, Danger, etc), you will feel like home.
System
import ProcessRunner try system(command: "echo hello world") // prints "hello world" to stdout
import ProcessRunner let output = try system(command: "echo hello world", captureOutput: true).standardOutput print(output) // prints "hello world"
import ProcessRunner print(try system(command: "echo hello world").success) // prints "true"
import ProcessRunner try system(shell: "echo hello cat > cat && cat cat | awk '{print $2}'") // prints "cat" to stdout
Add ProcessRunner to your Package.swift:
ProcessRunner
Package.swift
import PackageDescription let package = Package( name: "YourPackage", dependencies: [ .package(url: "git@github.com:eneko/ProcessRunner.git", from: "1.0.0"), ], targets: [ .target( name: "YourTarget", dependencies: ["ProcessRunner"]), ] )
Follow and/or contact me on Twitter at @eneko.
If you find an issue, just open a ticket on it. Pull requests are warmly welcome as well.
System is licensed under the MIT license. See LICENSE for more info.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
ProcessRunner
Easily execute system commands from a Swift script or command line tool.
Features
🚀 Executing child Processes from Swift scripts and CLI tools
Running child processes in Swift is not hard with
Process
, but it can be a bit tedious and repetitive.System
makes this task extremely easy. If you are familiar with Ruby scripting (Rakefile, Fastlane, Danger, etc), you will feel like home.💻 Automatically redirect output to stdout
✇ Capture process output
✔️ Check if process terminated gracefully
|> Easily execute Shell commands with pipes and redirects
Installation
Add
ProcessRunner
to yourPackage.swift
:💌 Contact
Follow and/or contact me on Twitter at @eneko.
👏 Contributions
If you find an issue, just open a ticket on it. Pull requests are warmly welcome as well.
👮♂️ License
System is licensed under the MIT license. See LICENSE for more info.