summaryrefslogtreecommitdiff
path: root/src/apk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/apk.c b/src/apk.c
index 7663d4c..4b97be5 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -30,6 +30,8 @@
#include "apk_blob.h"
#include "apk_print.h"
+char **apk_argv;
+
static struct apk_option generic_options[] = {
{ 'h', "help", "Show generic help or applet specific help" },
{ 'p', "root", "Install packages to DIR",
@@ -245,6 +247,10 @@ int main(int argc, char **argv)
struct apk_database db;
struct apk_db_options dbopts;
+ apk_argv = malloc(sizeof(char*[argc+1]));
+ memcpy(apk_argv, argv, sizeof(char*[argc]));
+ apk_argv[argc] = NULL;
+
memset(&dbopts, 0, sizeof(dbopts));
list_init(&dbopts.repository_list);
apk_atom_init();