diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-11-20 13:57:31 +0000 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-11-20 14:09:18 +0000 |
commit | d5b0d37ad9343b8d66fe99648d305a41199d3920 (patch) | |
tree | db3966aca61264e2ef2635bace6c4667bbd21abb /scripts/test-shell.c | |
parent | a75e5121478e2a645c65d276cc20f3eb659222f4 (diff) | |
download | morph-baserock/tiagogomes/multiple-sources.tar.gz |
WIP Add support for multiple sources per chunkbaserock/tiagogomes/multiple-sources
TODO:
- Add API to the cache server to retrieve a submodule commit from a
given path.
- Fix cross-bootstrap command.
Change-Id: I3475c2bcb648a272fee33bc878a521f79d4e6581
Diffstat (limited to 'scripts/test-shell.c')
-rw-r--r-- | scripts/test-shell.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/test-shell.c b/scripts/test-shell.c index 963d128c..9dadedcb 100644 --- a/scripts/test-shell.c +++ b/scripts/test-shell.c @@ -163,6 +163,12 @@ int run_commands(FILE *cmdstream){ ret = 1; break; } + } else if (strstr(line, "file exists ") == line) { + char const *filename = line + sizeof("file exists ") -1; + fprintf(stderr, "FILENAME: %s\n", filename); + struct stat st; + int result = stat(filename, &st); + return result != 0; } else if (strstr(line, "create file ") == line) { char const *filename = line + sizeof("create file ") -1; FILE *outfile = fopen(filename, "w"); |