-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·27 lines (27 loc) · 1.08 KB
/
install.sh
File metadata and controls
executable file
·27 lines (27 loc) · 1.08 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
#!/usr/bin/env sh
# eximagent installer — pins v0.1.77.
set -eu
os=$(uname -s | tr A-Z a-z)
case "$os" in linux|darwin) ;; *) echo "eximagent: unsupported OS $os" >&2; exit 1 ;; esac
arch=$(uname -m)
case "$arch" in
arm64|aarch64) arch=arm64 ;;
x86_64|amd64) arch=amd64 ;;
*) echo "eximagent: unsupported arch $arch" >&2; exit 1 ;;
esac
dir="${EXIMAGENT_INSTALL_DIR:-${HOME}/.eximagent/bin}"
mkdir -p "$dir"
bin="${dir}/eximagent-${os}-${arch}"
tmp="${bin}.download.$$"
echo "[eximagent] downloading v0.1.77 for ${os}-${arch}..." >&2
curl -fsSL "https://github.com/EximAgent/cli/releases/download/v0.1.77/eximagent-${os}-${arch}" -o "$tmp"
chmod +x "$tmp"
mv -f "$tmp" "$bin"
ln -sf "$bin" "${dir}/eximagent"
EXIMAGENT_INSTALL_DIR="$dir" EXIMAGENT_EXPECTED_TAG="v0.1.77" EXIMAGENT_BACKEND="https://cli.eximagent.ai" "${dir}/eximagent" install "$@"
if command -v eximagent >/dev/null 2>&1; then
echo "[eximagent] ready on PATH: $(command -v eximagent)" >&2
else
echo "[eximagent] installed to ${dir}; open a new terminal," >&2
echo "[eximagent] or run now: export PATH=\"${dir}:\$PATH\"" >&2
fi