47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# File 'lib/cor.rb', line 47
def self.project_create(args)
project_type = args[0]
project_name = args[1].to_s
unless Cor::Project_Types.include? project_type
puts "Wrong Project Type #{project_type}"
return
end
if project_name =~ /\w+/
project_dir = "./projects/#{project_name}"
if !File.exists?(project_dir)
FileUtils.mkdir_p(%W(#{project_dir} #{project_dir}/materials #{project_dir}/data #{project_dir}/src))
else
puts "#{project_name} Project is already exists. "
end
else
puts "Wrong Project Name #{project_name}. You can use [a-zA-Z_]."
end
end
|