nkiss

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/nkiss
Log | Files | Refs

commit ef98fb3a34095703f342f5170146843081470729
parent 60619769b5c4274263cfd316226464735f2b2bd8
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Thu, 18 Feb 2021 21:31:14 -0600

pkg.c: pkg_download: add directory extraction

Diffstat:
MTODO | 2+-
Mpkg.c | 5+++++
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/TODO b/TODO @@ -8,7 +8,7 @@ - [-] download - [ ] download git repositories - [X] download archives - - [ ] extraction path + - [X] extraction path - [ ] install - [X] list - [ ] remove diff --git a/pkg.c b/pkg.c @@ -25,6 +25,11 @@ pkg_download(char *name, struct source_t *sources, int count) destpath[dirlen] = '\0'; strcat(destpath, name); strcat(destpath, "/"); + if (sources[i].path) { + strcat(destpath, sources[i].path); + strcat(destpath, "/"); + } + mkdirs(destpath); strcat(destpath, basename(sources[i].loc));