Yes
This commit is contained in:
parent
ae75be2088
commit
6ec5c94969
@ -108,16 +108,10 @@ int cptree(const char *src, const char *dst) {
|
||||
}
|
||||
|
||||
int main(const int argc, const char **argv) {
|
||||
int i;
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (argv[i][0] != '-')
|
||||
break;
|
||||
|
||||
else if (!strcmp(argv[i], "-h")) {
|
||||
printf("cp [Src] [Dst]\n");
|
||||
return 0;
|
||||
}
|
||||
if (argc < 2 || !strcmp(argv[1], "-h")) {
|
||||
printf("cp [Src] [Dst]\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return cptree(argv[i], argv[argc - 1]);
|
||||
return cptree(argv[1], argv[2]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user