forked from beagleboard/librobotcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·68 lines (54 loc) · 1.42 KB
/
install.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
57
58
59
60
61
62
63
64
# basic install script to help when installing from source
# please use the debian package unless you know what you are doing!
echo ""
echo "This install script is just to help install from source."
echo "If you are running this on a BeagleBone we recommend running"
echo "the version which comes packaged and preinstalled in the "
echo "official BeagleBone images. Please visit this link for details:"
echo ""
echo "http://strawsondesign.com/docs/librobotcontrol/"
echo ""
echo "To continue, enter 1 to compile and install on BeagleBone"
echo "enter 2 for other platforms (Raspberry Pi, x86, etc..)"
echo ""
read n
case $n in
1)
mode=BB
echo "ready to install on BeagleBone, press enter to continue"
;;
2)
mode=OTHER
echo "ready to install generic library, press enter to continue"
;;
*)
echo "invalid option"
exit;;
esac
# wait for keypress
read n
case $mode in
BB)
# for BBB, compile and install everything
sudo debian/preinst
make
sudo make install
sudo ldconfig
sudo systemctl daemon-reload
sudo systemctl enable robotcontrol
sudo systemctl enable rc_battery_monitor
sudo configure_robotics_dt.sh
;;
OTHER)
# for other platforms just install libary and examples
make -C library --no-print-directory
make -C examples --no-print-directory
sudo make -C library -s install
sudo make -C examples -s install
sudo ldconfig
;;
*)
echo "invalid option"
exit;;
esac
echo "finished!"