ckiss

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 828cb5129d376c4d5035821c9fc538c8321e32fc
parent e0cc79528c41671e4420b75e8612313203629fe5
Author: aabacchus <ben@bvnf.space>
Date:   Fri, 21 Apr 2023 23:59:18 +0100

add version

Diffstat:
MREADME | 2+-
Msrc/kiss.h | 2++
Msrc/main.c | 7++++++-
3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/README b/README @@ -14,5 +14,5 @@ An implementation of the kiss package manager in C. [.] search [ ] update [ ] upgrade -[ ] version +[x] version [ ] external tools diff --git a/src/kiss.h b/src/kiss.h @@ -7,6 +7,8 @@ #define noreturn #endif +#define KISS_VERSION "0 (compat 5.6.4)" + struct cmd { char **args; }; diff --git a/src/main.c b/src/main.c @@ -1,11 +1,13 @@ +#include <stdio.h> #include <stdlib.h> #include "kiss.h" noreturn void usage(int r) { - mylog("kiss [l|s] [pkg]..."); + mylog("kiss [l|s|v] [pkg]..."); mylog("list List installed packages"); mylog("search Search for packages"); + mylog("version Package manager version"); exit(r); } @@ -23,6 +25,9 @@ main(int argc, char **argv) { case 's': search(argc - 1, argv + 1, e); break; + case 'v': + printf("%s\n", KISS_VERSION); + break; default: /* TODO: external tools */ usage(1);