@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 03:37 UTC

next
sh 67 lines 1.85 KB
Raw
1 #!/usr/bin/env bash
2
3 set -euo pipefail
4
5 version='2026.8.15'
6
7 if [[ -n "${MISE_INSTALL_PATH:-}" ]]; then
8 existing_binary="$MISE_INSTALL_PATH"
9 else
10 existing_binary=$(command -v mise 2>/dev/null || true)
11 fi
12
13 if [[ -x "$existing_binary" ]] && [[ "$("$existing_binary" --version | awk '{print $1}')" == "$version" ]]; then
14 exit 0
15 fi
16
17 case "$(uname -s)-$(uname -m)" in
18 Linux-x86_64)
19 target='linux-x64'
20 checksum='a6dea05e896f1e6090f821588f45397262270e0e0b456252f8d1da28a416f3f2'
21 ;;
22 Linux-aarch64|Linux-arm64)
23 target='linux-arm64'
24 checksum='124ea8f7c8cb9a6a3c99c763cbf37ca48c9beaa816735f011d9fd99e6cd463e9'
25 ;;
26 Darwin-x86_64)
27 target='macos-x64'
28 checksum='6a1cef931e299d7392cd7008dd97fcef2d9b41fbdfe79df4fd9f7ab0cc33d9f7'
29 ;;
30 Darwin-arm64)
31 target='macos-arm64'
32 checksum='17a6e37ac2aaeee78206abc601568e1fe5010e398bf3c7320e1683584124d3c7'
33 ;;
34 *)
35 echo "Unsupported mise platform: $(uname -s)-$(uname -m)" >&2
36 exit 1
37 ;;
38 esac
39
40 default_install_dir="${RUNNER_TEMP:-${TMPDIR:-/tmp}}/mise-bin"
41 binary="${MISE_INSTALL_PATH:-$default_install_dir/mise}"
42 install_dir=$(dirname "$binary")
43 asset="mise-v${version}-${target}"
44 url="https://github.com/jdx/mise/releases/download/v${version}/${asset}"
45
46 mkdir -p "$install_dir"
47 curl --fail --location --retry 3 --silent --show-error --output "$binary" "$url"
48
49 if command -v shasum >/dev/null 2>&1; then
50 actual_checksum=$(shasum -a 256 "$binary" | awk '{print $1}')
51 elif command -v sha256sum >/dev/null 2>&1; then
52 actual_checksum=$(sha256sum "$binary" | awk '{print $1}')
53 else
54 echo 'Neither shasum nor sha256sum is available to verify mise' >&2
55 rm -f "$binary"
56 exit 1
57 fi
58 if [[ "$actual_checksum" != "$checksum" ]]; then
59 echo "Checksum mismatch for $asset" >&2
60 rm -f "$binary"
61 exit 1
62 fi
63
64 chmod +x "$binary"
65 if [[ -n "${GITHUB_PATH:-}" ]]; then
66 echo "$install_dir" >> "$GITHUB_PATH"
67 fi