Skip to content

Commit 141db6a

Browse files
author
Owen L - SFE
committed
Create regen_artemis_svl.sh
1 parent 35d5115 commit 141db6a

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

tools/scripts/regen_artemis_svl.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/env bash
2+
3+
# use this script to update the artemis SVL based on the SparkFun AmbiqSuite BSP files
4+
5+
# setup
6+
set -e
7+
set -o errexit
8+
echo "" 1>&2
9+
10+
# get enclosing directory
11+
DIR=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")
12+
13+
# defaults
14+
BSP_ROOT=.
15+
ARTEMIS_TOOLS_ROOT=../artemis
16+
17+
# handle arguments
18+
while getopts ":r:b:" opt; do
19+
case $opt in
20+
r) BSP_ROOT="$OPTARG"
21+
;;
22+
\?) echo "Invalid option -$OPTARG" 1>&2
23+
;;
24+
esac
25+
done
26+
27+
# verify bsp root
28+
echo "Using \$BSP_ROOT=$BSP_ROOT" 1>&2
29+
VFILE=$BSP_ROOT/README.md
30+
if [ -f "$VFILE" ];
31+
then
32+
echo "\$BSP_ROOT verification passed" 1>&2
33+
else
34+
echo "\$BSP_ROOT verification failed" 1>&2
35+
exit 1
36+
fi
37+
38+
39+
# copy bsp files from BSP repo to Arduino variants
40+
echo "" 1>&2
41+
42+
echo "Removing SVL files" 1>&2
43+
rm -rf $ARTEMIS_TOOLS_ROOT/linux
44+
rm -rf $ARTEMIS_TOOLS_ROOT/macosx
45+
rm -rf $ARTEMIS_TOOLS_ROOT/windows
46+
rm -f $ARTEMIS_TOOLS_ROOT/artemis_svl.py
47+
48+
echo "Copying SVL files" 1>&2
49+
cp -r $BSP_ROOT/common/tools_sfe/artemis/linux $ARTEMIS_TOOLS_ROOT/linux
50+
cp -r $BSP_ROOT/common/tools_sfe/artemis/macosx $ARTEMIS_TOOLS_ROOT/macosx
51+
cp -r $BSP_ROOT/common/tools_sfe/artemis/windows $ARTEMIS_TOOLS_ROOT/windows
52+
cp $BSP_ROOT/common/tools_sfe/artemis/artemis_svl.py $ARTEMIS_TOOLS_ROOT/artemis_svl.py

0 commit comments

Comments
 (0)