import Foundation

let count = CommandLine.arguments.count
guard count > 1 else {
    abort()
}

let path = CommandLine.arguments[1]

if CommandLine.arguments.contains("export") {
    Process.launchedProcess(launchPath: "\(path)/scripts/localization_extract", arguments: [path]).waitUntilExit()
    exportLocalizationsFromSourceCode(path)
}

if CommandLine.arguments.contains("import") {
    importLocalizationsFromTWN(path)
}

import Foundation

let count = CommandLine.arguments.count
guard count > 1 else {
    abort()
}

let path = CommandLine.arguments[1]

//Process.launchedProcess(launchPath: "\(path)/scripts/localization_extract", arguments: [path]).waitUntilExit()

if CommandLine.arguments.contains("export") {
    exportLocalizationsFromSourceCode(path)
}

if CommandLine.arguments.contains("import") {
    importLocalizationsFromTWN(path)
}

--- 
+++ 
@@ -7,9 +7,8 @@
 
 let path = CommandLine.arguments[1]
 
-//Process.launchedProcess(launchPath: "\(path)/scripts/localization_extract", arguments: [path]).waitUntilExit()
-
 if CommandLine.arguments.contains("export") {
+    Process.launchedProcess(launchPath: "\(path)/scripts/localization_extract", arguments: [path]).waitUntilExit()
     exportLocalizationsFromSourceCode(path)
 }
 
Revert "Revert "run localization_extract along with the export""

This reverts commit dd520ebe528fc80be404c21eb4b7af53478395cf.
