-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdev_build.sh
More file actions
executable file
·37 lines (31 loc) · 848 Bytes
/
Copy pathdev_build.sh
File metadata and controls
executable file
·37 lines (31 loc) · 848 Bytes
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
#!/bin/bash
set -e
# Build the Rust binary
echo "Building Rust binary..."
cargo build --release
# Create platform-specific directory
PLATFORM=$(uname)
if [ "$PLATFORM" = "Darwin" ]; then
# Check if we're on Apple Silicon
if [ "$(uname -m)" = "arm64" ]; then
BINARY_DIR="binaries/darwin_arm64"
else
BINARY_DIR="binaries/darwin_x86_64"
fi
elif [ "$PLATFORM" = "Linux" ]; then
BINARY_DIR="binaries/linux_x86_64"
else
echo "Unsupported platform: $PLATFORM"
exit 1
fi
# Create directory if it doesn't exist
mkdir -p "$BINARY_DIR"
# Copy binary to platform-specific directory
echo "Copying binary to $BINARY_DIR..."
cp "target/release/lm" "$BINARY_DIR/"
# Install package locally
if [ "$1" = "--install" ]; then
echo "Installing package locally..."
pip install -e .
fi
echo "Dev build complete!"