new: cleaning up functions, base implementation of install function
This commit is contained in:
@ -30,13 +30,8 @@ int main(int argc, char *argv[]) {
|
||||
lm_ctx_pool_get_info(&ctx, true, true, NULL, NULL);
|
||||
lm_ctx_pool_get_list(&ctx, true, true, NULL, NULL);
|
||||
|
||||
if (lm_ctx_package_get(&ctx, "which", NULL) == NULL) {
|
||||
printf("failed to get the package: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!lm_ctx_package_verify(&ctx, "which", NULL)) {
|
||||
printf("failed to verify package: %s (%d)\n", lm_strerror(), lm_error());
|
||||
if(!lm_ctx_install(&ctx, "which")){
|
||||
printf("failed to install the package: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user