m8
/
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
#!/usr/bin/env bash
set -e
BUILD_TYPE="release"
if [[ $# > 0 ]]; then
if [[ $1 == "--debug" ]]; then
BUILD_TYPE="debug"
elif [[ $1 == "--release" ]]; then
BUILD_TYPE="release"
else
printf "usage: ./install.sh [--debug|--release]\n";
exit 1
fi
fi
# source environment variables
source ./env.sh
# build
./build.sh --${BUILD_TYPE}
cd build/${BUILD_TYPE}
# install
printf "\nInstalling ${APP} in ${BUILD_TYPE} mode\n"
sudo make install