forked from emlid/ReachView
-
Notifications
You must be signed in to change notification settings - Fork 1
/
update.sh
executable file
·48 lines (36 loc) · 1.72 KB
/
update.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
#!/bin/bash -x
# ReachView code is placed under the GPL license.
# Written by Egor Fedorov ([email protected])
# Copyright (c) 2015, Emlid Limited
# All rights reserved.
# If you are interested in using ReachView code as a part of a
# closed source project, please contact Emlid Limited ([email protected]).
# This file is part of ReachView.
# ReachView is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# ReachView is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with ReachView. If not, see <http://www.gnu.org/licenses/>.
sleep 1
cd /home/reach/ReachView
git fetch
if [[ $? -eq 0 ]];
then
echo "Successfully updated remote repo info, resetting to master..."
git checkout master
git reset --hard origin/master
echo "Copying default configs to RTKLIB directory"
cp /home/reach/ReachView/rtklib_configs/*.conf /home/reach/RTKLIB/app/rtkrcv/
cp /home/reach/ReachView/rtklib_configs/*.cmd /home/reach/RTKLIB/app/rtkrcv/
cp /home/reach/ReachView/rtklib_configs/rtkrcv /home/reach/RTKLIB/app/rtkrcv/gcc/
cp /home/reach/ReachView/rtklib_configs/str2str /home/reach/RTKLIB/app/str2str/gcc/
cp /home/reach/ReachView/rtklib_configs/convbin /home/reach/RTKLIB/app/convbin/gcc/
fi
/home/reach/ReachView/install_packages.sh
chown -R reach:users /home/reach
/home/reach/ReachView/server.py