diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-24 00:17:10 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-24 00:17:10 -0500 |
commit | 2c947166b0b573239c57d190031b4069174e4732 (patch) | |
tree | ddb5e5b4730465450e94cd9f3e01f3e6e75b87f5 /src | |
parent | cb88c4fdb648b9173011cf5f851e02b9175a2d29 (diff) | |
download | spmc-2c947166b0b573239c57d190031b4069174e4732.tar.gz |
Add install_show_package()
Diffstat (limited to 'src')
-rw-r--r-- | src/install.c | 9 |
1 files changed, 9 insertions, 0 deletions
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); } |