File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments