aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index ae6f927..1eaf9cf 100644
--- a/src/main.c
+++ b/src/main.c
@@ -33,9 +33,10 @@ msg_t *msg;
void
usage(char *program)
{
- printf("Usage: %s [-h] [-w] [-o <output>] <directory>\n", program);
+ printf("Usage: %s [-h] [-w] [-v] [-o <output>] <directory>\n", program);
printf("\t-h : Help\n");
printf("\t-w : Watch working directory for changes\n");
+ printf("\t-v : Verbose\n");
printf("\t-o <output>: Output directory\n");
printf("\t<directory>: Working directory\n");
}
@@ -58,8 +59,9 @@ main(int argc, char **argv)
msg = malloc(sizeof(msg_t));
msg->base_directory = ".";
msg->output_directory = "dist";
+ msg->verbose = false;
- while ((opt = getopt(argc, argv, "o:hw")) != -1) {
+ while ((opt = getopt(argc, argv, "o:hvw")) != -1) {
switch (opt) {
case 'o':
msg->output_directory = optarg;
@@ -67,6 +69,9 @@ main(int argc, char **argv)
case 'w':
watch = true;
break;
+ case 'v':
+ msg->verbose = true;
+ break;
case 'h':
default:
usage(argv[0]);