-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.sh
executable file
·41 lines (29 loc) · 896 Bytes
/
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
#!/usr/bin/env bash
if [ -n "$IOT_LAB_FRONTEND_FQDN" ]; then
source /opt/riot.source
fi
export SENSE_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
printf "%-25s %s\n" "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