-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·48 lines (39 loc) · 1.15 KB
/
build.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
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
set -eo pipefail
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SCRIPTSDIR=$BASEDIR/scripts
usage() {
echo "Usage: $0 [-p]"
}
while getopts "cph" o; do
case "$o" in
c) CONFIGURE=true
;;
p) SETUP_IP=true
;;
h) usage
exit
;;
esac
done
echo "Downloading components."
$SCRIPTSDIR/setup_components.sh
echo "Installing Python dependencies and creating virtual environment."
$SCRIPTSDIR/setup_python.sh
if [ $SKIP_IP ]; then
echo "Setting up IP configurations. You may be asked for an admin password."
sudo $SCRIPTSDIR/setup_ip_tables.sh
else
echo "Skipping IP setup. Run scripts/setup_ip_tables.sh if you change your mind."
fi
echo "Installing Git hooks."
$SCRIPTSDIR/setup_hooks.sh
if [ $CONFIGURE ]; then
echo "Configuring your settings."
$SCRIPTSDIR/setup_settings.sh
elif [ ! -f $BASEDIR/settings.cfg ]; then
echo "Skipping configuration, but settings.cfg is missing. Run configure.sh to write it."
else
echo "settings.cfg exists. Run configure.sh to rewrite it."
fi
echo "Heads up: you might also want to run configure-components.sh."