diff options
| author | Arslaan Pathan <[email protected]> | 2026-06-24 11:45:49 +1200 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-06-24 11:45:49 +1200 |
| commit | c9f18590f7736ef3e4ecf0f17a252825c812cab9 (patch) | |
| tree | 068253888521b726462f16b4670ca43a6e748f50 /src | |
| parent | a6b2af959868edfb810ab4c2e30defca0c7deca5 (diff) | |
| download | mbpk-c9f18590f7736ef3e4ecf0f17a252825c812cab9.tar.xz mbpk-c9f18590f7736ef3e4ecf0f17a252825c812cab9.zip | |
Small debug
Diffstat (limited to 'src')
| -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; } |
