diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-12-10 10:14:07 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-12-10 10:14:07 -0500 |
commit | 217bd310b9da9ea39e0ff41473b27b0b2fc1d5e8 (patch) | |
tree | a240980fbd82900d39d9d35e91c6565360bd89ce /spm.c | |
parent | e9e16cc286ae1bd89af50d0c29e00866e1826b6f (diff) | |
download | spmc-217bd310b9da9ea39e0ff41473b27b0b2fc1d5e8.tar.gz |
Start implementing configuration
Diffstat (limited to 'spm.c')
-rw-r--r-- | spm.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1191,6 +1191,15 @@ int install(const char *destroot, const char *_package) { free(ucd); } +int init_config_global() { + SPM_GLOBAL.user_config_basedir = get_user_conf_dir(); + SPM_GLOBAL.user_config_file = get_user_config_file(); + SPM_GLOBAL.package_dir = realpath(PKG_DIR, NULL); + if (SPM_GLOBAL.user_config_file) { + config_read(SPM_GLOBAL.user_config_file); + } +} + int main(int argc, char *argv[]) { // not much to see here yet // at the moment this will all be random tests, for better or worse |