oficina / base Public

Clone
git clone https://amadan.net/oficina/base

Plain git — no account needed to clone.

Download

Download this file

1#!/bin/sh
2# Copies Base's faces into BaseKit's resources (P8): Timeless Sans, fetched
3# by `make fonts` (git-ignored: its licence forbids committing it), and DM
4# Sans, the committed OFL fallback the web uses too. Every build runs this
5# first. Without Timeless Sans a dev build is set in DM Sans, as the web is;
6# --release refuses to go on without the pinned file (hack/fonts.sh check).
7set -eu
8cd "$(dirname "$0")/../.."
9fonts=native/apple/Sources/BaseKit/Resources/Fonts
10timeless=internal/look/static/fonts/timeless/1.094/TimelessSansVF.woff2
11dmsans=internal/look/static/fonts/dm-sans/4.004/DMSans-VF.woff2
12if [ "${1:-}" = --release ]; then
13 hack/fonts.sh check
14elif [ -n "${1:-}" ]; then
15 echo "usage: $0 [--release]" >&2; exit 2
16fi
17mkdir -p "$fonts"
18cp "$dmsans" "$fonts/DMSans-VF.woff2"
19if [ -f "$timeless" ]; then
20 cp "$timeless" "$fonts/TimelessSansVF.woff2"
21else
22 rm -f "$fonts/TimelessSansVF.woff2"
23 echo "fonts: no Timeless Sans (make fonts fetches it); this build is set in DM Sans"
24fi
25