forked from casper-astro/tutorials_devel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactivate_platform.sh
More file actions
executable file
·36 lines (31 loc) · 903 Bytes
/
activate_platform.sh
File metadata and controls
executable file
·36 lines (31 loc) · 903 Bytes
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
#!/bin/bash
SUPPORTED_PLATFORMS="roach2|snap|skarab|red_pitaya"
function help() {
echo ""
echo "Usage: $(basename $0) [${SUPPORTED_PLATFORMS}]"
echo ""
echo "Possible platforms are: ${SUPPORTED_PLATFORMS}"
echo "For example, to download the libraries for ROACH2, run:"
echo ""
echo "$(basename $0) roach2"
echo ""
exit
}
# If no platform provided, then bail out
if (( $# < 1 )); then
help
fi
for arg in $@; do
PLATFORM=$arg
if [[ "$PLATFORM" =~ ^(${SUPPORTED_PLATFORMS})$ ]]; then
echo "Initializing libraries for $PLATFORM platform"
# initialize submodules and update casperfpga every time.
# Doing this excessively shouldn't matter
git submodule init
git submodule update casperfpga
git submodule update $PLATFORM/mlib_devel
else
echo "Platform $PLATFORM is not supported"
echo "Supported platforms are: ${SUPPORTED_PLATFORMS}"
fi
done