diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-11-04 15:12:16 -0500 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-11-04 15:12:16 -0500 |
| commit | bf3ac9c4ccea766ad618b388002bb5fda7df50b8 (patch) | |
| tree | d095a725821a888779d22a198144baffa4466a3b | |
| parent | 77b5423ee039f2c81912d4f8df440eeda82811f5 (diff) | |
| download | stasis-bf3ac9c4ccea766ad618b388002bb5fda7df50b8.tar.gz | |
CANARY
| -rw-r--r-- | src/cli/stasis_indexer/stasis_indexer_main.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/cli/stasis_indexer/stasis_indexer_main.c b/src/cli/stasis_indexer/stasis_indexer_main.c index 3877681..7924e51 100644 --- a/src/cli/stasis_indexer/stasis_indexer_main.c +++ b/src/cli/stasis_indexer/stasis_indexer_main.c @@ -13,39 +13,54 @@ int indexer_combine_rootdirs(const char *dest, char **rootdirs, const size_t roo char destdir_with_output[PATH_MAX] = {0}; char *destdir = destdir_bare; + printf("destdir_bare\n"); strcpy(destdir_bare, dest); + puts("done"); + printf("destdir_with_output\n"); strcpy(destdir_with_output, dest); strcat(destdir_with_output, "/output"); + puts("done"); + printf("access destdir_with_output\n"); if (!access(destdir_with_output, F_OK)) { destdir = destdir_with_output; } + puts("sprintf 1"); snprintf(cmd, sizeof(cmd), "rsync -ah%s --delete --exclude 'tools/' --exclude 'tmp/' --exclude 'build/' ", globals.verbose ? "v" : "q"); for (size_t i = 0; i < rootdirs_total; i++) { char srcdir_bare[PATH_MAX] = {0}; char srcdir_with_output[PATH_MAX] = {0}; char *srcdir = srcdir_bare; + puts("srcdir_bare"); strcpy(srcdir_bare, rootdirs[i]); + puts("done"); + puts("srcdir_with_output"); strcpy(srcdir_with_output, rootdirs[i]); strcat(srcdir_with_output, "/output"); + puts("done"); + puts("access srcdir_bare"); if (access(srcdir_bare, F_OK)) { fprintf(stderr, "%s does not exist\n", srcdir_bare); continue; } + puts("access srcdir_with_output"); if (!access(srcdir_with_output, F_OK)) { srcdir = srcdir_with_output; } + puts("snprintf 2"); snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(srcdir) + 4, "'%s'/ ", srcdir); } + puts("snprintf 3"); snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(destdir) + 2, " %s/", destdir); if (globals.verbose) { puts(cmd); } + puts("running command"); if (system(cmd)) { return -1; } @@ -280,11 +295,8 @@ int main(const int argc, char *argv[]) { printf(BANNER, VERSION, AUTHOR); - printf("CANARY OPEN\n"); indexer_init_dirs(&ctx, workdir); - printf("CANARY CLOSE\n"); - printf("CANARY OPEN\n"); msg(STASIS_MSG_L1, "%s delivery root %s\n", rootdirs_total > 1 ? "Merging" : "Indexing", rootdirs_total > 1 ? "directories" : "directory"); @@ -293,7 +305,6 @@ int main(const int argc, char *argv[]) { rmtree(workdir); exit(1); } - printf("CANARY CLOSE\n"); if (access(ctx.storage.conda_artifact_dir, F_OK)) { mkdirs(ctx.storage.conda_artifact_dir, 0755); |
