-
Notifications
You must be signed in to change notification settings - Fork 46
/
install.sh
executable file
·48 lines (41 loc) · 1.36 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
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# -----------------------------------------------------------------------------
#
# Copyright (C) 2021 CERN & University of Surrey for the benefit of the
# BioDynaMo collaboration. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# See the LICENSE file distributed with this work for details.
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# -----------------------------------------------------------------------------
if [ $# -ge 2 ]; then
echo "ERROR: Wrong number of arguments.
Usage:
install.sh [<os>]
Description:
This script installs/updates the currently checked out version of biodynamo
Arguments:
<os> Specify manually which operating system is being used."
exit 1
fi
set -e
BDM_PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# include util functions
. $BDM_PROJECT_DIR/util/installation/common/util.sh
# Detect the OS (or get the one the user specified)
if [ -z $1 ]; then
BDM_DETECTED_OS=$(DetectOs)
else
BDM_DETECTED_OS=$1
fi
# Install all prerequisites
$BDM_PROJECT_DIR/prerequisites.sh all ${BDM_DETECTED_OS}
if [ $? != 0 ]; then
exit 1
fi
# call install script for the detected OS
$BDM_PROJECT_DIR/util/installation/common/install.sh ${BDM_DETECTED_OS}