9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/yptools/install/yp_install.rb', line 9
def self.install(name)
templates_url = "[email protected]:HansenCCC/kMVVM.git"
templates_path = Dir.pwd
templates_name = "kMVVM"
templates_path = templates_path + "/#{templates_name}"
yp_log_doing "生成临时文件#{templates_path}"
yp_method_rmdir templates_path
system("git clone #{templates_url}")
FileUtils.cd 'kMVVM'
system("sh install-template.sh")
FileUtils.cd '..'
yp_method_rmdir templates_path
yp_log_doing "移除临时文件#{templates_path}"
yp_log_success "安装#{templates_url}完成,重新打开Xcode才能生效"
end
|