install.sh
Shell command-substitution syntaxShell invokes Node with inline JavaScript
SHA-256dbf0fe14b296f2098a048704a86871214119b68e5b090312f91b95607ef8663e
MaleculeH₃(F₂OsPo₅)
Evidence
1#!/bin/sh
2set -eu
3
4ANIMA_PACKAGE_NAME="${ANIMA_PACKAGE_NAME:-@meetquinn/animactl}"
5ANIMA_VERSION_DEFAULT="latest"
6ANIMA_VERSION="${ANIMA_VERSION:-$ANIMA_VERSION_DEFAULT}"
⋯8 lines
15}
16
17have() {
18 command -v "$1" >/dev/null 2>&1
19}
20
21# The runtime loads node:sqlite, which needs no flag from Node 22.13. Node 23
22# could not load it before 23.4 and is end-of-life, so it is not supported.
23node_is_supported() {
24 node -e "const [major, minor] = process.versions.node.split('.').map(Number); process.exit((major === 22 && minor >= 13) || major >= 24 ? 0 : 1);"
25}
26
27print_node_help() {
28 cat >&2 <<'EOF'
29
30Anima needs Node.js 22.13+ or 24+. Node 23 is not supported. Node includes
31npm, which Anima uses to download and run the managed runtime package.
32
33Install Node.js, then run this command again:
34
35 macOS with Homebrew: brew install node
36 Other systems: https://nodejs.org/
37
⋯7 lines
45fi
46
47if ! node_is_supported 2>/dev/null; then
48 print_node_help