mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Add -q option to tix-install(8).
This commit is contained in:
parent
7bc9e067ec
commit
8d66162301
1 changed files with 7 additions and 1 deletions
|
@ -150,6 +150,7 @@ static void version(FILE* fp, const char* argv0)
|
|||
|
||||
static char* collection = NULL;
|
||||
static bool reinstall = false;
|
||||
static bool quiet = false;
|
||||
static char* tix_directory_path = NULL;
|
||||
static int generation;
|
||||
static const char* coll_prefix;
|
||||
|
@ -175,6 +176,7 @@ int main(int argc, char* argv[])
|
|||
char c;
|
||||
while ( (c = *++arg) ) switch ( c )
|
||||
{
|
||||
case 'q': quiet = true; break;
|
||||
default:
|
||||
fprintf(stderr, "%s: unknown option -- '%c'\n", argv0, c);
|
||||
help(stderr, argv0);
|
||||
|
@ -188,6 +190,8 @@ int main(int argc, char* argv[])
|
|||
else if ( GET_OPTION_VARIABLE("--collection", &collection) ) { }
|
||||
else if ( !strcmp(arg, "--reinstall") )
|
||||
reinstall = true;
|
||||
else if ( !strcmp(arg, "--quiet") )
|
||||
quiet = true;
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "%s: unknown option: %s\n", argv0, arg);
|
||||
|
@ -300,7 +304,9 @@ void InstallPackage(const char* tix_path)
|
|||
"--host=%s\".", coll_platform);
|
||||
}
|
||||
|
||||
printf("Installing `%s' into `%s'...\n", package_name, collection);
|
||||
if ( !quiet )
|
||||
printf("Installing `%s' into `%s'...\n", package_name, collection);
|
||||
|
||||
char* data_and_prefix = package_prefix && package_prefix[0] ?
|
||||
print_string("data%s", package_prefix) :
|
||||
strdup("data");
|
||||
|
|
Loading…
Reference in a new issue