forked from NVIDIA-AI-IOT/jetson-trashformers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetDependencies
executable file
·40 lines (30 loc) · 1.2 KB
/
getDependencies
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
#!/bin/bash
if [[ -f ./util/zigbee.h && -f ./lib/libzgb.a ]]; then
echo "Remote dependancies already installed"
else
##########DOWNLOADING ZIGB#############
echo "This program requires some dependencies from ROBOTIS.com:"
read -p "Would you like to download these dependancies? [Y/n]" -r
echo
#if [[ $REPLY =~ ^[Yy]|(\r\n|\r|\n)$ ]]; then
if [[ $REPLY =~ ^[Yy]$ ]] || [[ $REPLY =~ ^$ ]]; then
echo "####### Downloading Zigbee Dependencies ########"
#Download zigb files to a zip folder
wget -N http://support.robotis.com/en/baggage_files/zigbee_sdk/zigbee_sdk_linux_v1_00.zip
#extract the zip file to a folder
unzip ./zigbee_sdk_linux_v1_00.zip
#remove the zip file
rm ./zigbee_sdk_linux_v1_00.zip
#copy the zigbee header file to ./util
cp ./ZIGBEE_SDK_Linux_v1_00/include/zigbee.h ./util
#build zigbee binary
make -C ./ZIGBEE_SDK_Linux_v1_00/src
#copy the zigbee binary file to ./lib
cp ./ZIGBEE_SDK_Linux_v1_00/lib/libzgb.a ./lib
#remove ZIGBEE src folder
rm -rf ./ZIGBEE_SDK_Linux_v1_00
else
echo "!ABORT DOWNLOAD DEPENDANCIES!"
echo
fi
fi