| 213 | } |
| 214 | |
| 215 | bool file_tmpl::files_copy(const char* name, const FILE_FROM_TO* tab) |
| 216 | { |
| 217 | string from, to; |
| 218 | |
| 219 | from = "tmpl/Makefile.in"; |
| 220 | to.format("%s/Makefile.in", path_to_.c_str()); |
| 221 | |
| 222 | if (!file_copy(from.c_str(), "Makefile.in")) { |
| 223 | return false; |
| 224 | } |
| 225 | |
| 226 | for (size_t i = 0; tab[i].from != NULL; i++) { |
| 227 | from.format("%s/%s", path_from_.c_str(), tab[i].from); |
| 228 | //to.format("%s/%s", path_to_.c_str(), tab[i].to); |
| 229 | if (!file_copy(from, tab[i].to)) { |
| 230 | printf("create %s failed!\r\n", name); |
| 231 | return false; |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | printf("create %s ok!\r\n", name); |
| 236 | return true; |
| 237 | } |
no test coverage detected