https://github.com/meniny/bash
💻 Run Bash commands from Swift scripts and command line tools.
https://github.com/meniny/bash
Last synced: 12 months ago
JSON representation
💻 Run Bash commands from Swift scripts and command line tools.
- Host: GitHub
- URL: https://github.com/meniny/bash
- Owner: Meniny
- License: mit
- Created: 2018-05-08T15:40:45.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-19T10:36:10.000Z (about 8 years ago)
- Last Synced: 2025-04-08T20:02:53.380Z (about 1 year ago)
- Language: Swift
- Homepage:
- Size: 18.6 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE.md
Awesome Lists containing this project
README
:name: Bash
:author: Elias Abel
:mail: admin@meniny.cn
:desc: Run shell commands from Swift scripts and command line tools.
:version: 1.0.0
:na: N/A
:ios: {na}
:macos: 10.12
:watchos: {na}
:tvos: {na}
:linux: {na}
:xcode: 9.3
:swift: 4.1
:license: MIT
= Meet `{name}`
{author} <{mail}>
v{version}, 2018-05-08
[subs="attributes"]
++++

++++
:toc:
== 🏵 Introduction
**{name}** is {desc}.
== 📋 Requirements
[%header]
|===
2+^m|Type 1+^m|Requirement
1.5+^.^|Platform ^|iOS ^|{ios}+
^|macOS ^e|{macos}
^|tvOS ^e|{tvos}
^|watchOS ^e|{watchos}
^|Linux ^e|{linux}
^|IDE ^|Xcode ^| {xcode}+
^|Language ^|Swift ^| {swift}+
|===
== 📲 Installation
=== CocoaPods
`{name}` is available on link:https://cocoapods.org[CocoaPods].
[source, ruby, subs="verbatim,attributes"]
----
use_frameworks!
pod '{name}'
----
=== Manually
Copy all files in the `{name}` directory into your project.
== 🛌 Dependency
{na}
== ❤️ Contribution
You are welcome to fork and submit pull requests.
== 🔖 License
`{name}` is open-sourced software, licensed under the link:./LICENSE.md[`{license}`] license.
== 🔫 Usage
[source, swift, subs="verbatim,attributes"]
----
import {name}
do {
print(try Bash.run("cd", args: "~/Desktop"))
print(try Bash.run("pwd"))
print(try Bash.run("ls", args: "-al"))
} catch {
print(error)
}
----
[source, swift, subs="verbatim,attributes"]
----
import {name}
print(Bash.exec(commands: "cd ~/Desktop", "mkdir BashTest", "ls -al"))
----