diff options
Diffstat (limited to 'src/libmbpk.c')
| -rw-r--r-- | src/libmbpk.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libmbpk.c b/src/libmbpk.c index ebe943d..477dd97 100644 --- a/src/libmbpk.c +++ b/src/libmbpk.c @@ -72,9 +72,25 @@ static int repo_conf_handler(void* user, const char* section, const char* name, } int mbpk_update_repositories(void) { + /* Declarations */ + int i; + struct stat st; + + /* Parse repo config */ repo_count = 0; if (ini_parse(MBPK_REPO_CONFIG, repo_conf_handler, NULL) < 0) { return MBPK_REPO_FAIL; } + + if (stat(MBPK_REPO_DIR, &st) == -1) { + if (mkdir(MBPK_REPO_DIR, 0755) == -1) { + return MBPK_REPO_FAIL; + } + } + + for (i = 0; i < repo_count; i++) { + printf("Debug\n"); + } + return MBPK_OK; } |
