Add a 'pkg bootstrap' command which will bootstrap pkg(8) without
forwarding any command to it after installation. This is useful if the only goal is to install pkg(8) without any extra output. Requested by: cperciva Approved by: bapt MFC after: 2 days
This commit is contained in:
parent
1d28936445
commit
e863fdbd6f
@ -951,6 +951,15 @@ main(__unused int argc, char *argv[])
|
||||
if (bootstrap_pkg() != 0)
|
||||
exit(EXIT_FAILURE);
|
||||
config_finish();
|
||||
|
||||
if (argv[1] != NULL && strcmp(argv[1], "bootstrap") == 0)
|
||||
exit(EXIT_SUCCESS);
|
||||
} else {
|
||||
if (argv[1] != NULL && strcmp(argv[1], "bootstrap") == 0) {
|
||||
printf("pkg already bootstrapped at %s\n",
|
||||
pkgpath);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
execv(pkgpath, argv);
|
||||
|
Loading…
Reference in New Issue
Block a user