diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-17 23:07:40 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-17 23:07:40 -0400 |
| commit | f6eda4cf855fdf613cbcde0b073adfde43b354e7 (patch) | |
| tree | 7137bc20067202b0d0da1bca68a4df4d337df9d4 /tomo.c | |
| parent | 908373f6193bdaa8ac611c139a12a354a546aafa (diff) | |
Support running a directory directly
Diffstat (limited to 'tomo.c')
| -rw-r--r-- | tomo.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -167,6 +167,13 @@ int main(int argc, char *argv[]) return 0; } + // Convert `foo` to `foo/foo.tm` + for (int64_t i = 0; i < files.length; i++) { + Path_t *path = (Path_t*)(files.data + i*files.stride); + if (Path$is_directory(*path, true)) + *path = Path$with_component(*path, Texts(Path$base_name(*path), Text(".tm"))); + } + // Run file directly: if (!stop_at_transpile && !stop_at_obj_compilation && !stop_at_exe_compilation) { if (files.length < 1) |
