Files
zed/script/generate-terms-rtf
Lucas White dd091a1b4f Update installer terms to General Terms and Zed Product Terms (#67119)
Replaces the terms shown by the Zed installers with the new **General
Terms of Service** followed by the **Zed Product Terms** (both dated
November 18, 2026), and updates the `legal/` mirror of zed.dev's legal
pages to match.

### Installers affected

| Installer | Where terms come from | Change |
| --- | --- | --- |
| macOS DMG | `script/bundle-mac` → `dmg-license
script/terms/terms.json` → `terms.rtf` | New content; `terms.json`
unchanged and still points at `terms.rtf` |
| Windows (Inno Setup) | `crates/zed/resources/windows/zed.iss` →
`LicenseFile: "script\terms\terms.rtf"` (English and Simplified Chinese)
| New content; `zed.iss` unchanged |
| Linux (install script, Flatpak, tarball) | No install terms | None |

### Files

- `legal/terms.md`: now the General Terms of Service (zed.dev `/terms`).
- `legal/zed-product-terms.md` (new): Zed Product Terms (zed.dev
`/terms/zed`, `slug: terms/zed`).
- `legal/privacy-policy.md`: new Privacy Policy, titled "Zed Industries
Privacy Policy" (zed.dev `/privacy-policy`).
- `script/generate-terms-rtf`: now builds one RTF from both documents.
- `script/terms/terms.rtf`: regenerated.

Release Notes:

- N/A
2026-11-18 18:22:29 +00:00

25 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
if ! command -v pandoc &> /dev/null
then
brew install pandoc # Install pandoc using Homebrew
fi
# The installers show the General Terms followed by the Zed Product Terms as one
# document. Each file's front-matter title becomes a top-level heading, since
# pandoc keeps only one document title when it reads several files.
for document in ./legal/terms.md ./legal/zed-product-terms.md; do
title=$(awk 'NR == 1 && $0 != "---" { exit } NR > 1 && $0 == "---" { exit } sub(/^title: /, "")' "$document")
if [ -z "$title" ]; then
echo "error: no front-matter title in $document" >&2
exit 1
fi
printf '# %s\n\n' "$title"
awk 'NR == 1 && $0 == "---" { front_matter = 1; next } front_matter && $0 == "---" { front_matter = 0; next } !front_matter' "$document"
printf '\n'
# Without -autolink_bare_uris, pandoc also links URL-like text inside existing
# links, producing nested RTF hyperlink fields.
done | pandoc -f gfm-autolink_bare_uris -t rtf --standalone -o ./script/terms/terms.rtf