mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-23 18:14:06 +00:00
40c7198f7d
Adds script tools/update_readme.sh for regenerating the "Using Kvazaar" section of README.md from the output of "kvazaar --help".
36 lines
1 KiB
Bash
Executable file
36 lines
1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# This file is part of Kvazaar HEVC encoder.
|
|
#
|
|
# Copyright (C) 2013-2016 Tampere University of Technology and others (see
|
|
# COPYING file).
|
|
#
|
|
# Kvazaar is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Lesser General Public License version 2.1 as
|
|
# published by the Free Software Foundation.
|
|
#
|
|
# Kvazaar is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# Lesser General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with Kvazaar. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
if [[ $# != 1 ]]; then
|
|
printf "Usage: $0 README.md\n"
|
|
exit 1
|
|
fi
|
|
|
|
tmpfile="$(mktemp)"
|
|
|
|
{
|
|
sed '/BEGIN KVAZAAR HELP MESSAGE/q' -- "$1";
|
|
printf '```\n';
|
|
kvazaar --help;
|
|
printf '```\n';
|
|
sed -n '/END KVAZAAR HELP MESSAGE/{:a;p;n;ba}' -- "$1";
|
|
} >> "$tmpfile"
|
|
|
|
mv -- "$tmpfile" "$1"
|