aboutsummaryrefslogtreecommitdiff
path: root/src/modules.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules.c')
-rw-r--r--src/modules.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules.c b/src/modules.c
index df6bade3..36952ec8 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -28,7 +28,7 @@ const char *get_library_version(Path_t lib_dir) {
Path_t changes_file = Path$child(lib_dir, Text("CHANGES.md"));
OptionalText_t changes = Path$read(changes_file);
if (changes.length <= 0) {
- return "v0.0";
+ return "v0";
}
const char *changes_str = Text$as_c_string(Texts(Text("\n"), changes));
const char *version_line = strstr(changes_str, "\n## ");
@@ -41,7 +41,7 @@ Text_t get_library_name(Path_t lib_dir) {
Text_t name = Path$base_name(lib_dir);
name = Text$without_prefix(name, Text("tomo-"));
name = Text$without_suffix(name, Text("-tomo"));
- Text_t suffix = Texts(Text("_"), Text$from_str(get_library_version(lib_dir)));
+ Text_t suffix = Texts(Text("@"), Text$from_str(get_library_version(lib_dir)));
if (!Text$ends_with(name, suffix, NULL)) name = Texts(name, suffix);
return name;
}
@@ -102,7 +102,7 @@ module_info_t get_used_module_info(ast_t *use) {
const char *name = Match(use, Use)->path;
module_info_t *info = new (module_info_t, .name = name);
Path_t tomo_default_modules =
- Path$from_text(Texts(Text$from_str(TOMO_PATH), "/lib/tomo_" TOMO_VERSION "/modules.ini"));
+ Path$from_text(Texts(Text$from_str(TOMO_PATH), "/lib/tomo@" TOMO_VERSION "/modules.ini"));
read_modules_ini(tomo_default_modules, info);
read_modules_ini(Path$sibling(Path$from_str(use->file->filename), Text("modules.ini")), info);
read_modules_ini(Path$with_extension(Path$from_str(use->file->filename), Text(":modules.ini"), false), info);
@@ -111,8 +111,8 @@ module_info_t get_used_module_info(ast_t *use) {
}
bool try_install_module(module_info_t mod, bool ask_confirmation) {
- Path_t dest = Path$from_text(Texts(Text$from_str(TOMO_PATH), "/lib/tomo_" TOMO_VERSION "/", Text$from_str(mod.name),
- "_", Text$from_str(mod.version)));
+ Path_t dest = Path$from_text(Texts(Text$from_str(TOMO_PATH), "/lib/tomo@" TOMO_VERSION "/", Text$from_str(mod.name),
+ "@", Text$from_str(mod.version)));
if (Path$exists(dest)) return true;
print("No such path: ", dest);