Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-27T23:36:26.460Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

download-wasi-sdk

62 lines · 1.5 KB · text
1#!/bin/bash
2set -euo pipefail
3
4# Check if ./target/wasi-sdk exists
5if [ ! -d "./target/wasi-sdk" ]; then
6    echo "WASI SDK not found, downloading v25..."
7
8    # Determine OS and architecture
9    OS=$(uname -s | tr '[:upper:]' '[:lower:]')
10    ARCH=$(uname -m)
11
12    # Map architecture names to WASI SDK format
13    case $ARCH in
14        x86_64)
15            ARCH="x86_64"
16            ;;
17        arm64|aarch64)
18            ARCH="arm64"
19            ;;
20        *)
21            echo "Unsupported architecture: $ARCH"
22            exit 1
23            ;;
24    esac
25
26    # Map OS names to WASI SDK format
27    case $OS in
28        darwin)
29            OS="macos"
30            ;;
31        linux)
32            OS="linux"
33            ;;
34        mingw*|msys*|cygwin*)
35            OS="mingw"
36            ;;
37        *)
38            echo "Unsupported OS: $OS"
39            exit 1
40            ;;
41    esac
42
43    # Construct download URL
44    WASI_SDK_VERSION="25"
45    WASI_SDK_URL="https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-${ARCH}-${OS}.tar.gz"
46
47    echo "Downloading from: $WASI_SDK_URL"
48
49    # Create target directory if it doesn't exist
50    mkdir -p ./target
51
52    # Download and extract
53    curl -fL "$WASI_SDK_URL" | tar -xz -C ./target
54
55    # Rename the extracted directory to wasi-sdk
56    mv "./target/wasi-sdk-${WASI_SDK_VERSION}.0-${ARCH}-${OS}" "./target/wasi-sdk"
57
58    echo "WASI SDK v25 installed successfully"
59else
60    echo "WASI SDK already exists at ./target/wasi-sdk"
61fi
62
Served at tenant.openagents/omega Member data and write actions are omitted.