aboutsummaryrefslogtreecommitdiff
path: root/spm.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2019-12-10 10:14:07 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2019-12-10 10:14:07 -0500
commit217bd310b9da9ea39e0ff41473b27b0b2fc1d5e8 (patch)
treea240980fbd82900d39d9d35e91c6565360bd89ce /spm.c
parente9e16cc286ae1bd89af50d0c29e00866e1826b6f (diff)
downloadspmc-217bd310b9da9ea39e0ff41473b27b0b2fc1d5e8.tar.gz
Start implementing configuration
Diffstat (limited to 'spm.c')
-rw-r--r--spm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/spm.c b/spm.c
index 3c18cf9..1cfc737 100644
--- a/spm.c
+++ b/spm.c
@@ -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