-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.sh
executable file
·49 lines (35 loc) · 1.04 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
44
45
46
47
48
49
#!/usr/bin/env bash
if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then
if [ -n "$SENSE_SETUP_UP" ]; then
return 0
fi
fi
if [ -n "$IOT_LAB_FRONTEND_FQDN" ]; then
source /opt/riot.source
fi
export SENSE_HOME="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
printf "%-50s %s\n" "DataStreamPilot: SENSE_HOME:" "$SENSE_HOME"
SCRIPTS=scripts
export SENSE_FIRMWARE_HOME="${SENSE_HOME}/bin"
if [ ! -d "$SENSE_FIRMWARE_HOME" ]; then
mkdir -p "$SENSE_FIRMWARE_HOME"
fi
if [ ! -d "${SENSE_FIRMWARE_HOME}/$SCRIPTS" ]; then
TARGET_DIR="${SENSE_HOME}/scripts"
ln -s "$TARGET_DIR" "${SENSE_FIRMWARE_HOME}"
fi
export SENSE_SCRIPTS_HOME="${SENSE_FIRMWARE_HOME}/${SCRIPTS}"
export SENSE_STOPPERS_HOME="${SENSE_SCRIPTS_HOME}/stoppers"
if [ ! -d "$SENSE_SCRIPTS_HOME" ]; then
mkdir -p "$SENSE_SCRIPTS_HOME"
fi
if [ ! -d "$SENSE_STOPPERS_HOME" ]; then
mkdir -p "$SENSE_STOPPERS_HOME"
fi
if [ ! -d "$SENSE_HOME/external/RIOT/boards" ]; then
(
cd $SENSE_SCRIPTS_HOME
./init.sh
)
fi
export SENSE_SETUP_UP=1