-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·35 lines (25 loc) · 1.25 KB
/
install.sh
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
#!/bin/bash
echo "BAT install start!"
# Ensure the script is run with superuser privileges for the package installations
if [ "$(id -u)" != "0" ]; then
echo "Please type sudo and this file name because it will first install a few libraries."
exit 1
fi
# Set the current directory to where the script is located
cd "$(dirname "$0")"
# Clone the repository only if it doesn't already exist
if [ ! -d "../nest" ]; then
git clone https://github.com/petrasvestartas/nest.git ../nest
fi
# Navigate to the cmake directory and create a build directory
mkdir -p build
cd build
# Step 5: Download libraries
cmake -B . -S .. -DGET_LIBS=ON -DCOMPILE_LIBS=OFF -DBUILD_MY_PROJECTS=OFF -DRELEASE_DEBUG=ON -DCMAKE_BUILD_TYPE="Release" -G "Unix Makefiles" && make
# Step 6: Build 3rd-party libraries
cmake -B . -S .. -DGET_LIBS=OFF -DBUILD_MY_PROJECTS=ON -DCOMPILE_LIBS=ON -DRELEASE_DEBUG=ON -DCMAKE_BUILD_TYPE="Release" -G "Unix Makefiles" && make
# Step 7: Build the database_viewer code
cmake -B . -S .. -DGET_LIBS=OFF -DBUILD_MY_PROJECTS=ON -DCOMPILE_LIBS=OFF -DRELEASE_DEBUG=ON -DCMAKE_BUILD_TYPE="Release" -G "Unix Makefiles" && make
# Step 8: Build the database_viewer code after making changes (e.g., in main.cpp)
make VERBOSE=1 && ../build/nest
echo "BAT install end!"