release: Hermit 1.0.0 — home layout, icon font, install
Compact the home parliament chip, animate crab states like the HTML kit, ship hermit-icons.ttf (sbix) + frames, and install the font from make/ bootstrap/package paths. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -49,6 +49,35 @@ install_bin() {
|
||||
ln -sf hermit "$prefix/bin/cst-agent"
|
||||
}
|
||||
|
||||
install_font() {
|
||||
local prefix="$1" dir="$2"
|
||||
local ttf=""
|
||||
if [[ -f "$dir/res/hermit-icons.ttf" ]]; then
|
||||
ttf="$dir/res/hermit-icons.ttf"
|
||||
elif [[ -f "$dir/share/hermit/hermit-icons.ttf" ]]; then
|
||||
ttf="$dir/share/hermit/hermit-icons.ttf"
|
||||
elif [[ -f "$dir/hermit-icons.ttf" ]]; then
|
||||
ttf="$dir/hermit-icons.ttf"
|
||||
fi
|
||||
[[ -n "$ttf" ]] || {
|
||||
echo "warning: hermit-icons.ttf not found; run 'make hermit-font' in the tree" >&2
|
||||
return 0
|
||||
}
|
||||
mkdir -p "$prefix/share/hermit" "$prefix/share/fonts/hermit" \
|
||||
"${HOME:-/tmp}/.local/share/fonts"
|
||||
install -m 0644 "$ttf" "$prefix/share/hermit/hermit-icons.ttf"
|
||||
install -m 0644 "$ttf" "$prefix/share/fonts/hermit/hermit-icons.ttf"
|
||||
install -m 0644 "$ttf" "${HOME}/.local/share/fonts/hermit-icons.ttf"
|
||||
if [[ -d "$dir/res/hermit-frames" ]]; then
|
||||
mkdir -p "$prefix/share/hermit/frames"
|
||||
cp -a "$dir/res/hermit-frames/." "$prefix/share/hermit/frames/"
|
||||
fi
|
||||
if command -v fc-cache >/dev/null 2>&1; then
|
||||
fc-cache -f "${HOME}/.local/share/fonts" >/dev/null 2>&1 || true
|
||||
fi
|
||||
echo "==> installed Hermit Icons font"
|
||||
}
|
||||
|
||||
install_helpers() {
|
||||
local prefix="$1" dir="$2"
|
||||
mkdir -p "$prefix/bin"
|
||||
@@ -123,8 +152,12 @@ install_from_release() {
|
||||
bin="$(find "$tmp" -type f \( -name hermit -o -name cst-agent \) | head -1)"
|
||||
[[ -x "$bin" ]] || { echo "tarball missing hermit/cst-agent" >&2; rm -rf "$tmp"; return 1; }
|
||||
install_bin "$prefix" "$bin"
|
||||
# Font may live next to the binary inside the tarball.
|
||||
local rel_dir
|
||||
rel_dir="$(dirname "$bin")"
|
||||
install_font "$prefix" "$rel_dir"
|
||||
rm -rf "$tmp"
|
||||
echo "==> installed release $ver ($arch) -> $prefix/bin/cst-agent"
|
||||
echo "==> installed release $ver ($arch) -> $prefix/bin/hermit"
|
||||
}
|
||||
|
||||
main() {
|
||||
@@ -211,8 +244,11 @@ main() {
|
||||
run_make -j"$jobs" check >/dev/null 2>&1 || echo "warning: some tests failed (run 'make check')"
|
||||
fi
|
||||
|
||||
echo "==> install to $prefix/bin"
|
||||
install_bin "$prefix" "$dir/cst-agent"
|
||||
echo "==> bake Hermit Icons font (if tooling present)"
|
||||
run_make hermit-font >/dev/null 2>&1 || true
|
||||
echo "==> install to $prefix/bin (+ font)"
|
||||
install_bin "$prefix" "$dir/hermit"
|
||||
install_font "$prefix" "$dir"
|
||||
install_helpers "$prefix" "$dir"
|
||||
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user