Modify drogon_ctl

This commit is contained in:
antao 2018-09-12 17:09:08 +08:00
parent 2bb2bc67a2
commit a6c21037c5
1 changed files with 6 additions and 1 deletions

View File

@ -118,8 +118,13 @@ static void newGitIgFile(std::ofstream &gitFile)
}
void create_project::createProject(const std::string &projectName)
{
std::cout<<"create a project named "<<projectName<<std::endl;
if(access(projectName.data(),0)==0)
{
std::cerr<<"The directory already exists, please use another project name!"<<std::endl;
exit(1);
}
std::cout<<"create a project named "<<projectName<<std::endl;
mkdir(projectName.data(),0755);
//1.create CMakeLists.txt
chdir(projectName.data());