Add --project-directory option to generate command to easily use relative path
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit

This commit is contained in:
2022-08-31 16:42:22 +02:00
parent 3d60513c08
commit e9bc779da6
22 changed files with 136 additions and 67 deletions

View File

@ -60,7 +60,7 @@ class FontsToolHelper {
private static func getFontName(atPath path: String) -> String {
//print("fc-scan --format %{postscriptname} \(path)")
// Get real font name
let task = Shell.shell("fc-scan", "--format", "%{postscriptname}", path)
let task = Shell.shell(["fc-scan", "--format", "%{postscriptname}", path])
guard let fontName = task.output, task.terminationStatus == 0 else {
let error = FontsToolError.fcScan(path, task.terminationStatus, task.output)

View File

@ -14,7 +14,7 @@ class FontExtensionGenerator {
// Check file if not exists
let fileManager = FileManager()
if fileManager.fileExists(atPath: extensionFilePath) == false {
Shell.shell("touch", "\(extensionFilePath)")
Shell.shell(["touch", "\(extensionFilePath)"])
}
// Create extension content