-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README with new package name (#12)
- Loading branch information
Showing
3 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# System | ||
# ProcessRunner | ||
|
||
![System](/system.png) | ||
![ProcessRunner](/processrunner.png) | ||
|
||
![Release](https://img.shields.io/github/release/eneko/System.svg) | ||
![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg) | ||
|
@@ -29,15 +29,15 @@ scripting (Rakefile, Fastlane, Danger, etc), you will feel like home. | |
### 💻 Automatically redirect output to stdout | ||
|
||
```swift | ||
import System | ||
import ProcessRunner | ||
|
||
try system(command: "echo hello world") // prints "hello world" to stdout | ||
``` | ||
|
||
### ✇ Capture process output | ||
|
||
```swift | ||
import System | ||
import ProcessRunner | ||
|
||
let output = try system(command: "echo hello world", captureOutput: true).standardOutput | ||
print(output) // prints "hello world" | ||
|
@@ -46,35 +46,35 @@ print(output) // prints "hello world" | |
### ✔️ Check if process terminated gracefully | ||
|
||
```swift | ||
import System | ||
import ProcessRunner | ||
|
||
print(try system(command: "echo hello world").success) // prints "true" | ||
``` | ||
|
||
### |> Easily execute Shell commands with pipes and redirects | ||
|
||
```swift | ||
import System | ||
import ProcessRunner | ||
|
||
try system(shell: "echo hello cat > cat && cat cat | awk '{print $2}'") // prints "cat" to stdout | ||
``` | ||
|
||
## Installation | ||
|
||
Add `System` to your `Package.swift`: | ||
Add `ProcessRunner` to your `Package.swift`: | ||
|
||
```swift | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "YourPackage", | ||
dependencies: [ | ||
.package(url: "[email protected]:eneko/System.git", from: "1.0.0"), | ||
.package(url: "[email protected]:eneko/ProcessRunner.git", from: "1.0.0"), | ||
], | ||
targets: [ | ||
.target( | ||
name: "YourTarget", | ||
dependencies: ["System"]), | ||
dependencies: ["ProcessRunner"]), | ||
] | ||
) | ||
``` | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.