-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·41 lines (39 loc) · 1.66 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·41 lines (39 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Fusengine Kimi Plugins - Quick Setup
# Bootstraps Bun if missing (the installer itself runs on Bun), then installs
# into $KIMI_CODE_HOME (default ~/.kimi-code).
set -e
if ! command -v bun >/dev/null 2>&1; then
echo "⚠️ Bun not found — the Fusengine installer runs on Bun."
if command -v brew >/dev/null 2>&1; then
# Homebrew present: official tap only (brew upgrade keeps bun fresh)
read -r -p "Install Bun via Homebrew (oven-sh/bun tap)? [Y/n] " answer
case "${answer:-Y}" in
[Yy]*) brew install oven-sh/bun/bun ;;
*)
echo "❌ Bun is required. Install it (brew install oven-sh/bun/bun) then re-run ./setup.sh"
exit 1
;;
esac
else
read -r -p "Install Bun now via the official installer (bun.sh)? [Y/n] " answer
case "${answer:-Y}" in
[Yy]*)
curl -fsSL https://bun.sh/install | bash
# Make bun available for the rest of this script (new shells get it via rc file)
export BUN_INSTALL="${BUN_INSTALL:-$HOME/.bun}"
export PATH="$BUN_INSTALL/bin:$PATH"
;;
*)
echo "❌ Bun is required. Install it from https://bun.sh then re-run ./setup.sh"
exit 1
;;
esac
fi
if ! command -v bun >/dev/null 2>&1; then
echo "❌ Bun install did not complete. Install from https://bun.sh then re-run ./setup.sh"
exit 1
fi
fi
# Installer dependencies (@clack/prompts UI), then run the installer.
(cd "$(dirname "$0")" && bun install --silent && bun run scripts/install-kimi.ts --yes)