| 1 | #! /usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash |
| 2 | # Libvisual - The audio visualisation framework. |
| 3 | # |
| 4 | # Copyright (C) 2023 Libvisual team |
| 5 | # |
| 6 | # Authors: Sebastian Pipping <[email protected]> |
| 7 | # |
| 8 | # This program is free software; you can redistribute it and/or modify |
| 9 | # it under the terms of the GNU Lesser General Public License as |
| 10 | # published by the Free Software Foundation; either version 2.1 |
| 11 | # of the License, or (at your option) any later version. |
| 12 | # |
| 13 | # This program is distributed in the hope that it will be useful, |
| 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | # GNU Lesser General Public License for more details. |
| 17 | # |
| 18 | # You should have received a copy of the GNU Lesser General Public License |
| 19 | # along with this program; if not, write to the Free Software |
| 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 21 | |
| 22 | set -e -u -o pipefail |
| 23 | |
| 24 | _BUILD_MONTH=2023-03 # for reproducible builds; bump when doing releases |
| 25 | |
| 26 | help2man_args=( |
| 27 | --no-info |
| 28 | --name 'Command-line tool to interact with Libvisual' |
| 29 | lv-tool-0.4 |
| 30 | ) |
| 31 | sed_args=( |
| 32 | # Be robust towards version difference between local help2man and CI help2man |
| 33 | -e 's,It was generated by help2man .*,It was generated by help2man.,' |
| 34 | |
| 35 | # Improve formatting of values in "--arg <value>" |
| 36 | -e 's, <\([^>]\+\)>,\\ \\c\n.IR \1 ,g' |
| 37 | |
| 38 | # Fix lack of space after comma in e.g. "--input input,-i input" |
| 39 | -e 's|, |,\\ |g' |
| 40 | ) |
| 41 | |
| 42 | SOURCE_DATE_EPOCH="$(datescip-shell system . . date. --date="${_BUILD_MONTH}-15" +%s)" \ |
| 43 | help2man "${help2man_args[@]}" \ |
| 44 | | sedscip-shell system . . sed. "${sed_args[@]}" \ |
| 45 | > lv-tool-0.4.1 |