Skip to content

Commit c64e9ed

Browse files
committed
Add a launch script for linux for the "lazy-man's launch.
1 parent 272b464 commit c64e9ed

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

launch_plugin.sh

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
3+
file_x86="./it.baeyens.arduino.product/target/products/it.baeyens.arduino.product/linux/gtk/x86/opt/eclipseArduino/eclipse"
4+
file_x86_64="./it.baeyens.arduino.product/target/products/it.baeyens.arduino.product/linux/gtk/x86_64/opt/eclipseArduino/eclipse"
5+
file=""
6+
7+
echo "Trying to build and launch the Arduino Eclipse Plugin"
8+
9+
echo "First we build with Maven. This may download a lot and take some time (it is downloading all Eclipse CDT for you)"
10+
mvn --version
11+
if [[ $? -ne 0 ]] ; then
12+
echo "Maven not installed"
13+
exit 1
14+
fi
15+
16+
#This is the actual build
17+
mvn verify
18+
if [[ $? -ne 0 ]] ; then
19+
echo "Problem in build"
20+
exit 1
21+
fi
22+
23+
24+
echo "Now we find the Eclipse executable (with our plugin pre-packaged) and launch it"
25+
#Find an executable if we made it successfully
26+
if [[ -x "$file_x86" ]]
27+
then
28+
#echo "File '$file_x86' is executable"
29+
file=$file_x86
30+
fi
31+
32+
if [[ -x "$file_x86_64" ]]
33+
then
34+
#echo "File '$file_x86_64' is executable"
35+
file=$file_x86_64
36+
fi
37+
38+
39+
40+
if [[ -x "$file" ]]
41+
then
42+
echo "Executing $file"
43+
echo "Execute the executable above directly if you don't want to rebuild subsequently"
44+
eval $file
45+
exit 0;
46+
else
47+
echo "Did not find an Eclipse executable built....."
48+
exit 1;
49+
fi
50+

0 commit comments

Comments
 (0)