diff options
author | Timo Teräs <timo.teras@iki.fi> | 2020-05-19 10:50:57 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-05-19 10:50:57 +0300 |
commit | 12fdf6fc219321d22825042ae08efd322acc0310 (patch) | |
tree | 007ebbc061b54a7cc0173e4a6ff5dd60cc3da17f /src/help.c | |
parent | 5e251b21fd791ec5f6830af5ca18333c8db1b1c8 (diff) | |
download | apk-tools-12fdf6fc219321d22825042ae08efd322acc0310.tar.gz apk-tools-12fdf6fc219321d22825042ae08efd322acc0310.tar.bz2 apk-tools-12fdf6fc219321d22825042ae08efd322acc0310.tar.xz apk-tools-12fdf6fc219321d22825042ae08efd322acc0310.zip |
allow building without help when lua interpreter is not available
fixes #10696
Diffstat (limited to 'src/help.c')
-rw-r--r-- | src/help.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -10,7 +10,7 @@ #include "apk_applet.h" #include "apk_print.h" -static int is_group(struct apk_applet *applet, const char *topic) +static inline int is_group(struct apk_applet *applet, const char *topic) { if (!applet) return strcasecmp(topic, "apk") == 0; if (strcasecmp(topic, applet->name) == 0) return 1; @@ -23,6 +23,7 @@ void apk_help(struct apk_applet *applet) { #include "help.h" +#ifndef NO_HELP char buf[uncompressed_help_size], *ptr, *msg; unsigned long len = sizeof buf; int num = 0; @@ -38,4 +39,8 @@ void apk_help(struct apk_applet *applet) } } if (num == 0) apk_error("Help not found"); +#else + fputc('\n', stdout); + apk_error("This apk-tools has been built without help"); +#endif } |