-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
47 lines (34 loc) · 887 Bytes
/
Copy pathbuild.sh
File metadata and controls
47 lines (34 loc) · 887 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
#!/bin/sh
# This script sets up and builds the project on Linux/Mac
# Exit on error
set -e
mkdir -p ~/ba67/bin
rm -f ~/ba67/bin/BA67 2>/dev/null
# Create build directory if it doesn't exist
mkdir -p ~/ba67/out/build
cd ~/ba67/out/build
# Run CMake to configure the project
cmake -DCMAKE_BUILD_TYPE=Release ../..
# Build the project
# make clean
make
# Optionally install the project
# sudo make install
if [ ! -d ~/BASIC ]; then
mkdir ~/BASIC
fi
cp --force --recursive --update ~/ba67/examples/ ~/BASIC/examples/
if [ -f ~/ba67/bin/BA67 ]; then
echo build succeeded
chmod +x ~/ba67/bin/BA67
cp --force ~/ba67/bin/BA67 /opt/BA67
# make clean
if [ -d ~/.local/bin ]; then
ln -s /opt/BA67 ~/.local/bin/BA67 2>/dev/null
else
ln -s /opt/BA67 /usr/local/BA67 2>/dev/null
fi
cd ~/ba67
else
echo build failed!
fi