[cleanup] Print uvg266 version every time the CLI is launched, fix manpage and README gen

This commit is contained in:
Marko Viitanen 2022-05-03 16:35:25 +03:00
parent d3e8ce026a
commit 20ecb128cd
4 changed files with 4 additions and 4 deletions

View file

@ -385,7 +385,6 @@ void cmdline_opts_free(const uvg_api *const api, cmdline_opts_t *opts)
void print_usage(void)
{
print_version();
fprintf(stdout,
"usage: -i and --input-res to set input, -o to set output\n"
" --help for more information\n");
@ -401,7 +400,6 @@ void print_version(void)
void print_help(void)
{
print_version();
fprintf(stdout,
"Usage:\n"
"uvg266 -i <input> --input-res <width>x<height> -o <output>\n"

View file

@ -479,6 +479,8 @@ int main(int argc, char *argv[])
const uvg_api * const api = uvg_api_get(8);
print_version();
opts = cmdline_opts_parse(api, argc, argv);
// If problem with command line options, print banner and shutdown.
if (!opts) {

View file

@ -18,7 +18,7 @@ uvg266 \- open source VVC encoder
.SH DESCRIPTION
EOF
../bin/uvg266 --help 2>&1 | tail -n+5 | head -n-4 | \
../bin/uvg266 --help 2>&1 | tail -n+5 | \
sed 's| : |\n|g;
s| :$||g;
s|^ --|.TP\n\\fB--|g;

View file

@ -42,7 +42,7 @@ readme_file="../README.md"
{
sed '/BEGIN UVG266 HELP MESSAGE/q' -- "$readme_file";
printf '```\n';
../bin/uvg266 --help;
../bin/uvg266 --help 2>&1 | tail -n+2;
printf '```\n';
sed -n '/END UVG266 HELP MESSAGE/{:a;p;n;ba}' -- "$readme_file";
} >> "$tmpfile"