Commit b8940df6 authored by Natanael Copa's avatar Natanael Copa
Browse files

apk: support for ROOT environment variable

parent 09385545
......@@ -20,7 +20,7 @@
#include "apk_defines.h"
#include "apk_applet.h"
const char *apk_root = "/";
const char *apk_root;
const char *apk_repository = NULL;
int apk_quiet = 0, apk_progress = 0;
int apk_cwd_fd;
......@@ -115,6 +115,10 @@ int main(int argc, char **argv)
argc -= optind;
argv += optind;
apk_root = getenv("ROOT");
if (apk_root == NULL)
apk_root = "/";
if (applet == NULL) {
if (argc > 0)
applet = find_applet(argv[0]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment