Remove legacy online installer entrypoints, collapse migrations for 4.0, and move setup responsibilities into target-side system, hardware, and user commands.
28 lines
819 B
Bash
28 lines
819 B
Bash
# Setup default work directory (and tries)
|
|
mkdir -p "$HOME/Work"
|
|
mkdir -p "$HOME/Work/tries"
|
|
|
|
cat >"$HOME/Work/.mise.toml" <<'EOF'
|
|
[env]
|
|
_.path = "{{ cwd }}/bin"
|
|
EOF
|
|
|
|
mise trust ~/Work/.mise.toml
|
|
|
|
if [[ ${OMARCHY_SETUP_CONTEXT:-runtime} == "iso-chroot" ]]; then
|
|
NODE_TARBALL=$(find /opt/packages -name "node-v*-linux-x64.tar.gz" -type f 2>/dev/null | head -n1)
|
|
if [[ -z $NODE_TARBALL ]]; then
|
|
echo "Error: bundled Node.js tarball missing from /opt/packages" >&2
|
|
exit 1
|
|
fi
|
|
|
|
NODE_VERSION=$(basename "$NODE_TARBALL" | sed 's/node-v\(.*\)-linux-x64.tar.gz/\1/')
|
|
NODE_INSTALL_DIR="$HOME/.local/share/mise/installs/node/$NODE_VERSION"
|
|
|
|
mkdir -p "$NODE_INSTALL_DIR"
|
|
tar -xzf "$NODE_TARBALL" --strip-components=1 -C "$NODE_INSTALL_DIR"
|
|
mise use -g node@"$NODE_VERSION"
|
|
else
|
|
mise use -g node@latest
|
|
fi
|