-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.sh
executable file
·43 lines (39 loc) · 1.02 KB
/
setup.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
#!/bin/sh
set -e # Fail at the first error
BASEDIR_ABS=$(cd "$(dirname "$0")" && pwd)
SIMULATORS_DIR="$BASEDIR_ABS/simulators"
echo "Fetching simulators in $SIMULATORS_DIR"
if [ -d "$SIMULATORS_DIR" ]; then
echo "Simulators dir was setup in previous run"
else
mkdir -p "$SIMULATORS_DIR"
fi
echo "Fetching cadmium"
CADMIUM_DIR="$SIMULATORS_DIR/cadmium"
if [ -d "$CADMIUM_DIR" ]; then
cd "$CADMIUM_DIR"
git pull
else
cd $SIMULATORS_DIR
git clone https://github.com/SimulationEverywhere/cadmium.git
fi
echo "Fetching cdboost"
CDBOOST_DIR="$SIMULATORS_DIR/cdboost"
if [ -d "$CDBOOST_DIR" ]; then
cd "$CDBOOST_DIR"
git pull
else
cd $SIMULATORS_DIR
git clone https://scm.gforge.inria.fr/anonscm/git/cdboost/cdboost.git
fi
#adevs does not have a git repository available
echo "Fetching adevs"
ADEVS_DIR="$SIMULATORS_DIR/adevs"
if [ -d "$ADEVS_DIR" ]; then
cd "$ADEVS_DIR"
git svn fetch
git svn rebase
else
cd $SIMULATORS_DIR
git svn clone https://svn.code.sf.net/p/adevs/code/trunk adevs
fi