#!/bin/sh # Regenerate THIRD-PARTY-LICENSES: the licences and notices of everything built into GITv's # binaries that isn't GITv's own code. Run it whenever dependencies change; CI checks that the # committed file is current. Needs cargo-about (cargo install cargo-about --locked --features cli). # # scripts/third-party-licenses # rewrite THIRD-PARTY-LICENSES # scripts/third-party-licenses FILE # write FILE instead set -eu root=$(cd "$(dirname "$0")/.." && pwd) cd "$root" out=${1:-THIRD-PARTY-LICENSES} tmp="$out.tmp.$$" trap 'rm -f "$tmp"' EXIT { cat <<'HEADER' Third-party software in GITv ============================ GITv itself is licensed under the GNU Affero General Public License, version 3 or later (see LICENSE). The gitv and gitv-web binaries also contain the software below, each under its own licence, reproduced here as those licences require. Generated by scripts/third-party-licenses. HEADER cargo about generate --locked --fail -c licenses/about.toml licenses/about.hbs cat <<'FONTS' ================================================================================ Red Hat Display, Red Hat Text and Red Hat Mono fonts (OFL-1.1) Built into gitv-web, from crates/gitv-web/assets/fonts. FONTS cat crates/gitv-web/assets/fonts/OFL.txt cat <<'SYNTAXES' ================================================================================ Syntax definitions from Sublime Text's Packages Built into gitv-web through syntect's default syntax set, from https://github.com/sublimehq/Packages. Unless a file there says otherwise: Permission to copy, use, modify, sell and distribute this software is granted. This software is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose. SYNTAXES } > "$tmp" mv "$tmp" "$out" trap - EXIT