pm

barely a pack manager
git clone git://z3bra.org/pm
Log | Files | Refs | README | LICENSE

commit 1e9efd313217ed16e878585b1b9bb927e3dd9f79
parent ab5dde9fdbeed7ac63ed95442f846c5eeabc97af
Author: z3bra <willyatmailoodotorg>
Date:   Wed Dec 30 11:38:52 2015

Use a macro for package extension

Diffstat:
 pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pm.c b/pm.c @@ -15,6 +15,7 @@ #define PACKAGE_DATA "test/metadata" #define PACKAGE_CACHE "test/cache" #define PACKAGE_BUFF_SIZE 8192 +#define PACKAGE_EXTENSION ".tar.bz2" struct pkg { char *path; @@ -293,7 +294,7 @@ pack_load_file(char *path) *p = ':'; snprintf(tmp, PATH_MAX, "%s", p + 1); - for (p = tmp; *p && strcmp(p, ".tar.bz2"); p++); + for (p = tmp; *p && strcmp(p, PACKAGE_EXTENSION); p++); if (!*p) { free(pack); return NULL;