From 2c947166b0b573239c57d190031b4069174e4732 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 24 Feb 2020 00:17:10 -0500 Subject: Add install_show_package() --- src/install.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/install.c') diff --git a/src/install.c b/src/install.c index c1d0f8c..cf22d23 100644 --- a/src/install.c +++ b/src/install.c @@ -33,6 +33,14 @@ int metadata_remove(const char *_path) { return 0; } +void install_show_package(ManifestPackage *package) { + if (package == NULL) { + fprintf(stderr, "ERROR: package was NULL\n"); + return; + } + printf(" -> %-10s %-10s (origin: %s)\n", package->name, package->version, package->origin); +} + /** * Install a package and its dependencies into a destination root. * The destination is created if it does not exist. @@ -103,6 +111,7 @@ int install(const char *destroot, const char *_package) { if (SPM_GLOBAL.verbose) { printf("Installing tree: '%s' => '%s'\n", source, destroot); } + if (rsync(NULL, source, destroot) != 0) { exit(1); } -- cgit