Skip to content

Commit

Permalink
[cleanup] Print uvg266 version every time the CLI is launched, fix ma…
Browse files Browse the repository at this point in the history
…npage and README gen
  • Loading branch information
fador committed May 3, 2022
1 parent d3e8ce0 commit 20ecb12
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions src/encmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion tools/genmanpage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tools/update_readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 20ecb12

Please sign in to comment.