GITv
master
third-party-licenses49 lines, 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/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