-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·43 lines (33 loc) · 1.06 KB
/
build.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
#! /bin/zsh
PATH_TO_MODULES=../klangstrom/klangstrom/platforms/klangstrom-arduino
MY_PATH=`pwd`
copyPlatfrom() {
echo "### copying platform : $1"
DST_DIR=$MY_PATH/$1
SRC_DIR=$PATH_TO_MODULES/$1
if [ -d $DST_DIR ]; then
echo "### removing existing folder : $DST_DIR"
rm -rf $DST_DIR
fi
echo "### copying folder : $SRC_DIR"
cp -r $SRC_DIR $MY_PATH
}
echo "###"
echo "### copying platform package from development repository to arduino library distribution repository"
echo "###"
# copyPlatfrom shared
copyPlatfrom stm32
copyPlatfrom desktop
#copyModul vcvrack
echo "###"
source ../build.config
# copy examples to doc
EXAMPLE_CODE_DOC_FOLDER=./docs/_includes/code/
mkdir -p $EXAMPLE_CODE_DOC_FOLDER
for folder in $KLST_ARDUINO_LIBRARIES
do
echo "### copying examples from '$folder'"
# find $PATH_TO_MODULES/libraries/$folder/examples/ -name '*.ino' -exec echo {} \;
find $PATH_TO_MODULES/libraries/$folder/examples/ -name 'Example*.ino' -exec cp {} $EXAMPLE_CODE_DOC_FOLDER \;
done
echo "###"