summaryrefslogtreecommitdiff
path: root/lib/util/print_version.c
blob: 47508b52262bfdcc5685da01ddbc1f08dc4a4f05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* SPDX-License-Identifier: ISC */
#include <stdlib.h>
#include <stdio.h>

#include "config.h"
#include "util.h"

static const char *version_string =
"%s (pygos init) " PACKAGE_VERSION "\n"
"Copyright (C) 2018 David Oberhollenzer\n\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n";

void print_version(const char *program)
{
	fprintf(stdout, version_string, program);
	exit(EXIT_SUCCESS);
}