BUG: Custom commands should actually generate the files they claim to generate.
This commit is contained in:
parent
886c559518
commit
e1c110d244
@ -1,7 +1,17 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int main()
|
int main(int argc, const char* argv[])
|
||||||
{
|
{
|
||||||
printf("Hello\n");
|
FILE* fout = fopen(argv[argc-1], "w");
|
||||||
|
printf("Wrap creating \"%s\"\n", argv[argc-1]);
|
||||||
|
if(fout)
|
||||||
|
{
|
||||||
|
fprintf(fout, "int foo() { return 0; }\n");
|
||||||
|
fclose(fout);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,10 @@ int main(int ac, char** av)
|
|||||||
{
|
{
|
||||||
for(int i =0; i < ac; ++i)
|
for(int i =0; i < ac; ++i)
|
||||||
{
|
{
|
||||||
if(strcmp(av[i], "-o") == 0)
|
if(strcmp(av[i], "-o") == 0 ||
|
||||||
|
strcmp(av[i], "-h") == 0)
|
||||||
{
|
{
|
||||||
|
fprintf(stdout, "fakefluid is creating file \"%s\"\n", av[i+1]);
|
||||||
FILE* file = fopen(av[i+1], "w");
|
FILE* file = fopen(av[i+1], "w");
|
||||||
fprintf(file, "// hello\n");
|
fprintf(file, "// hello\n");
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user