-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·35 lines (30 loc) · 846 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·35 lines (30 loc) · 846 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
#!/bin/bash
# Builds Ebe
# If run as a root, it will also compy newly build ebe into /usr/bin/ebe
# If first argument is the word "debug", the build type will be for developers
#
# @autor Marek Sedlacek
# @date February 2022
# All right reserved, see LICENSE file
#
# Source (-S) option for cmake
SOURCE=.
# Build (-B) option for cmake
BUILD=build
# Build type
BUILD_TYPE=Release
# Check if debug
if [[ "$1" == "debug" || "$1" == "Debug" || "$1" == "DEBUG" ]]
then
BUILD_TYPE=Debug
echo "Building for Debug"
fi
# CMake
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -S $SOURCE -B $BUILD && cmake --build $BUILD --target ebe
# Try moving to /usr/bin
if cp $BUILD/ebe /usr/bin/ebe
then
echo "Moved Ebe to /usr/bin/ebe. You can now use 'ebe' as a command."
else
echo "Could not move Ebe to /usr/bin/, try running script as a root."
fi