From d5b0d37ad9343b8d66fe99648d305a41199d3920 Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Fri, 20 Nov 2015 13:57:31 +0000 Subject: WIP Add support for multiple sources per chunk TODO: - Add API to the cache server to retrieve a submodule commit from a given path. - Fix cross-bootstrap command. Change-Id: I3475c2bcb648a272fee33bc878a521f79d4e6581 --- scripts/test-shell.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/test-shell.c') 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"); -- cgit v1.2.1