diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-12-28 12:28:25 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-12-28 12:28:25 -0500 |
commit | 5a754bcdc0f5e432c1d7cd358c74dfb2d6f0f1ea (patch) | |
tree | a60ffaacdaa394f8a9772220b50a47d5f51bddc6 /src/install.c | |
parent | a267f8258162fdab350944676b2e71f858c3de51 (diff) | |
download | spmc-5a754bcdc0f5e432c1d7cd358c74dfb2d6f0f1ea.tar.gz |
Fixes:
* doxygen config
* doxygen @file directives
* corrected stupid strip() implemention
* corrected strip usage by config parser. wrong pointer.
Diffstat (limited to 'src/install.c')
-rw-r--r-- | src/install.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/install.c b/src/install.c index 7ecb401..8f56363 100644 --- a/src/install.c +++ b/src/install.c @@ -1,9 +1,13 @@ +/** + * @file install.c + */ #include "spm.h" /** - * + * SPM packages contain metadata files that are not useful post-install and would amount to a lot of clutter. + * This function removes these data files from a directory tree * @param _path - * @return + * @return success=0, error=-1 */ int metadata_remove(const char *_path) { char *metadata[] = { @@ -35,6 +39,13 @@ int metadata_remove(const char *_path) { return 0; } +/** + * Install a package and its dependencies into a destination root. + * The destination is created if it does not exist. + * @param destroot directory to install package + * @param _package name of archive to install (not a path) + * @return success=0, error=-1 (general), -2 (unable to create `destroot`) + */ int install(const char *destroot, const char *_package) { char *package = find_package(_package); if (!package) { @@ -99,4 +110,5 @@ int install(const char *destroot, const char *_package) { rmdirs(tmpdir); free(package); + return 0; } |