-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_env.sh
executable file
·56 lines (47 loc) · 1.42 KB
/
gen_env.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
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
svn_sdcc="svn://svn.code.sf.net/p/sdcc/code/trunk/sdcc"
git_stm8flash="https://github.com/vdudouyt/stm8flash"
git_src_test="https://github.com/vdudouyt/sdcc-examples-stm8.git"
#Check if svn and git are installed
command -v git >/dev/null 2>&1 || { echo "I require git but it's not installed. Aborting." >&2; exit 1; }
command -v svn >/dev/null 2>&1 || { echo "I require svn but it's not installed. Aborting." >&2; exit 1; }
if [ ! -e ./example_src_stm8 ]; then
echo "==============================="
echo "|| Clone example src stm8 ||"
echo "==============================="
git clone ${git_src_test} example_src_stm8
else
echo "example_src_stm8 folder exist, don't clone it."
fi
if [ ! -e ./stm8flash ]; then
echo "==============================="
echo "|| Clone stm8flash ||"
echo "==============================="
git clone ${git_stm8flash} stm8flash
else
echo "stm8flash folder exist, don't clone it."
fi
if [ ! -e ./sdcc ]; then
echo "==============================="
echo "|| Clone sdcc repo ||"
echo "==============================="
svn checkout ${svn_sdcc} sdcc
else
echo "sdcc folder exist, don't clone it."
fi
#line feed
echo ""
echo ""
echo "-----To compile stm8flash-----"
echo "$ cd stm8flash"
echo "$ make"
echo ""
echo ""
echo "-----To compile and install sdcc-----"
echo "$ cd sdcc"
echo "$ ./configure"
echo "$ make"
echo "$ sudo make install"
echo ""
echo "HAVE FUN :)"
exit 0