mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-07-23 09:21:56 +00:00
feat: script to build monado
This commit is contained in:
parent
3d98a3e5e2
commit
c24bb2eecd
1 changed files with 29 additions and 0 deletions
29
scripts/build_monado.sh
Executable file
29
scripts/build_monado.sh
Executable file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# exit on error
|
||||||
|
# echo commands
|
||||||
|
set -ev
|
||||||
|
|
||||||
|
REPO_DIR=$1
|
||||||
|
|
||||||
|
if [[ -z $REPO_DIR ]]; then
|
||||||
|
echo "Usage: $0 MONADO_REPO_DIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "$REPO_DIR" ]]; then
|
||||||
|
if [[ ! -d "$REPO_DIR/.git" ]]; then
|
||||||
|
echo "Error: $REPO_DIR exists but is not a git repository"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
git -C "$REPO_DIR" pull
|
||||||
|
else
|
||||||
|
git clone https://gitlab.freedesktop.org/monado/monado "$REPO_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$REPO_DIR"
|
||||||
|
mkdir -p build
|
||||||
|
cd build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||||
|
make clean
|
||||||
|
make -j$(nproc)
|
Loading…
Add table
Add a link
Reference in a new issue