   
   /// User select xctemplate
   var templateName: String = templates[0]
- 
+  
   while true {
     print("Select template number : ", terminator: "")
     let input = readLine() ?? "0"

  return output.trimmingCharacters(in: .newlines)
}

func isRootUserWithSudoCommand(selectNumber: Int) -> Bool {
  return bash(command: "whoami", arguments: []) == "root"
}


//  Copyright © 2017 giftbott. All rights reserved.
//


import Foundation

let fileManager = FileManager.default

/// Should select template only if more than one
func setup() {
  let templateChecker = try? fileManager
    .contentsOfDirectory(atPath: ".")
    .filter { $0.hasSuffix(".xctemplate") }
  
  guard let templates = templateChecker, templates.count > 0 else {
    printInConsole("xctemplate directory does not exist")
    return
  }
  
  guard templates.count > 1 else {
    installTemplate(templates[0])
    return
  }
  
  /// Show xctemplates in current directory
