| 41 | } |
| 42 | |
| 43 | bool files_copy(const char* name, const FILE_FROM_TO* tab, |
| 44 | const char* from_path, const char* to_path) |
| 45 | { |
| 46 | string from, to; |
| 47 | |
| 48 | from = "tmpl/Makefile.in"; |
| 49 | to.format("%s/Makefile.in", to_path); |
| 50 | if (file_copy(from.c_str(), to.c_str()) == false) |
| 51 | return false; |
| 52 | |
| 53 | for (size_t i = 0; tab[i].from != NULL; i++) |
| 54 | { |
| 55 | from.format("%s/%s", from_path, tab[i].from); |
| 56 | to.format("%s/%s", to_path, tab[i].to); |
| 57 | if (file_copy(from, to) == false) |
| 58 | { |
| 59 | printf("create %s failed!\r\n", name); |
| 60 | return false; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | printf("create %s ok!\r\n", name); |
| 65 | return true; |
| 66 | } |
no test coverage detected
searching dependent graphs…