forked from Sloeber/arduino-eclipse-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_then_launch.sh
executable file
·44 lines (33 loc) · 1 KB
/
build_then_launch.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/bash
file_x86_64="./io.sloeber.product/target/products/io.sloeber.product/linux/gtk/x86_64/Sloeber/sloeber-ide"
file=""
echo "Trying to build and then launch the Arduino Eclipse IDE"
echo "First we build with Maven. This may download a lot and take some time (it is downloading all Eclipse CDT for you)"
mvn --version
if [[ $? -ne 0 ]] ; then
echo "Maven not installed"
exit 1
fi
#This is the actual build
mvn clean verify -DskipTests=true
if [[ $? -ne 0 ]] ; then
echo "Problem in build"
exit 1
fi
echo "Searching for the Eclipse executable (with our plugin pre-packaged) to launch"
#Find an executable if we made it successfully
if [[ -x "$file_x86_64" ]]
then
#echo "File '$file_x86_64' is executable"
file=$file_x86_64
fi
if [[ -x "$file" ]]
then
echo "Executing $file"
echo "Execute the executable above directly if you don't want to rebuild subsequently"
eval $file
exit 0;
else
echo "Did not find an Eclipse Arduino IDE executable built....."
exit 1;
fi