mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-13 10:04:04 +01:00
23 lines
449 B
Swift
23 lines
449 B
Swift
|
//
|
||
|
// Tasks.swift
|
||
|
// Clover
|
||
|
//
|
||
|
// Created by vector sigma on 24/11/2019.
|
||
|
// Copyright © 2019 CloverHackyColor. All rights reserved.
|
||
|
//
|
||
|
|
||
|
import Foundation
|
||
|
|
||
|
func run(cmd: String) {
|
||
|
let task = Process()
|
||
|
if #available(OSX 10.13, *) {
|
||
|
task.executableURL = URL(fileURLWithPath: "/bin/bash")
|
||
|
} else {
|
||
|
task.launchPath = "/bin/bash"
|
||
|
}
|
||
|
task.environment = ProcessInfo.init().environment
|
||
|
task.arguments = ["-c", cmd]
|
||
|
task.launch()
|
||
|
}
|
||
|
|