-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·52 lines (41 loc) · 983 Bytes
/
install.sh
File metadata and controls
executable file
·52 lines (41 loc) · 983 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
set -e
INSTALL=false
# Parse arguments
for arg in "$@"; do
case $arg in
--install)
INSTALL=true
shift
;;
*)
echo "Unknown option: $arg"
echo "Usage: ./install_and_build.sh [--install]"
exit 1
;;
esac
done
echo "🔧 Installing system dependencies..."
sudo apt update
sudo apt install -y \
build-essential \
cmake \
git \
zlib1g-dev \
libomp-dev \
libpthread-stubs0-dev
echo "📦 Cloning submodules..."
git submodule update --init --recursive
echo "🏗️ Creating build directory..."
mkdir -p build
cd build
echo "⚙️ Running CMake..."
cmake ..
echo "🚀 Building the project..."
make -j$(nproc)
echo "✅ Build complete. Binary is located at: build/mcaat"
if $INSTALL; then
echo "📥 Installing binary to /usr/local/bin..."
sudo cp mcaat /usr/local/bin/
echo "✅ Installed. You can now run 'mcaat' from anywhere."
fi