File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [[ ! -f Makefile ]];
4
+ then
5
+ echo Run this script from the root folder of BOSSA
6
+ exit 1
7
+ fi
8
+
9
+ make clean
10
+
11
+ VERSION=` cat Makefile | grep ^VERSION= | tr ' =' ' ' | awk ' { print $2; }' `
12
+ OS=` uname -s | cut -c -7`
13
+
14
+ if [[ x$OS == xDarwin ]];
15
+ then
16
+ # OSX
17
+ make bin/bossac -j4
18
+ strip bin/bossac
19
+ GCC_ARCH=` gcc -v -arch i386 2>&1 | awk ' /Target/ { print $2 }' `
20
+ elif [[ x$OS == xMINGW32 ]];
21
+ then
22
+ # Windows
23
+ make bin/bossac.exe -j4
24
+ strip --strip-all bin/bossac.exe
25
+ GCC_ARCH=` gcc -v 2>&1 | awk ' /Target/ { print $2 }' `
26
+ else
27
+ # Linux
28
+ make bin/bossac -j4
29
+ strip --strip-all bin/bossac
30
+ GCC_ARCH=` gcc -v 2>&1 | awk ' /Target/ { print $2 }' `
31
+ fi
32
+
33
+ mkdir " arduino/bossac-$VERSION "
34
+ cp bin/bossac* " arduino/bossac-$VERSION "
35
+ cd arduino
36
+ tar cfz bossac-$VERSION -$GCC_ARCH .tar.gz bossac-$VERSION
37
+ cd ..
38
+ rm -r " arduino/bossac-$VERSION "
39
+
You can’t perform that action at this time.
0 commit comments