-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLD_logLob_F.bash
More file actions
executable file
·71 lines (58 loc) · 1.43 KB
/
LD_logLob_F.bash
File metadata and controls
executable file
·71 lines (58 loc) · 1.43 KB
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
65
66
67
68
69
70
71
#‘ªà¨¯â § £à㧪¨ ¡¨¡«¨®â¥ª¨ ®££¥à ¯àאַ ¢ ¯à®¥ªâ fiscat ¨ ª áá㠄ਬª á ”
#à §à ¡®â稪
#!/bin/bash
if ! [ -e cmake-build-release/liblogDB.so ];
then
echo "Failed to find liblogDB.so!"
echo "Deploy aborted..."
exit 2;
fi
if ! [ -d src/appl/include ];
then
echo "Includes not found!"
echo "Deploy aborted..."
exit 2;
fi
if ! [ -d /usr/local/arm_linux_4.8/usr/lib/ ];
then
echo "arm-linux-4.8/usr/lib/ directory not found";
echo "Deploy aborted..."
exit 2;
fi
md5sum cmake-build-release/liblogDB.so \
> cmake-build-release/ethalonLib_logDB_MD5
sudo cp cmake-build-release/liblogDB.so /usr/local/arm_linux_4.8/usr/lib/
if ! [ $? -eq 0 ];
then
echo "Failed to patch compiler!"
echo "Deploy aborted..."
exit 2;
fi
if ! [ -d ../FisGo/liblogDB/ ];
then
mkdir -p ../FisGo/liblogDB/
fi
cp src/appl/include/logdb_c_cpp.h ../FisGo/liblogDB/
if ! [ $? -eq 0 ];
then
echo "Failed to patch FisGo(liblogDB.so) project!"
echo "Deploy aborted..."
exit 2;
fi
echo "Do you need to patch device? y/n"
read need
if [ $need = "y" ];
then
echo "Please, insert device ip!"
read deviceIp;
scp cmake-build-release/liblogDB.so root@$deviceIp:/lib/
scp cmake-build-release/ethalonLib_logDB_MD5 root@$deviceIp:/FisGo/
if ! [ $? -eq 0 ];
then
echo "Failed to patch device!"
echo "DEPLOY FINISHED WITH ERRORS!"
exit 1;
fi
fi
echo "DEPLOY FINISHED CORRECT!"
exit 0