-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (32 loc) · 857 Bytes
/
main.cpp
File metadata and controls
35 lines (32 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "Builder.hpp"
#include <iostream>
int main(int argc, char *argv[])
{
Builder builder;
int i;
i = 1;
while (i < argc)
builder.setup(argv[i++]);
if (argc == 1)
{
builder.setup();
builder.setup_makefile();
builder.setup_main();
}
std::cout << std::endl;
if (builder.get_is_path_defined())
std::cout << "Files created in " GREEN << builder.get_path() << RESET " :" << std::endl;
else
std::cout << "Files created in " << GREEN "current directory" RESET << " :" << std::endl;
for (i = 0; i < ARRAY_LIMIT; i++)
{
if (builder.get_array_member(i).empty())
break;
std::cout << "- " << builder.get_array_member(i) << ".hpp/.cpp\n";
}
if (builder.get_is_makefile_created())
std::cout << builder.get_makefile() << std::endl;
if (builder.get_is_main_created())
std::cout << builder.get_main() << std::endl;
return 0;
}