-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathgitpull.sh
More file actions
executable file
·21 lines (18 loc) · 794 Bytes
/
gitpull.sh
File metadata and controls
executable file
·21 lines (18 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/bash
export LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib
export HOME=/data/data/com.termux/files/home
export PATH=/usr/local/bin:/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/sbin:/data/data/com.termux/files/usr/bin/applets:/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin:/data/data/com.termux/files/usr/bin/python
export PYTHONPATH=/data/openpilot
cd /data/openpilot
BRANCH=$(git rev-parse --abbrev-ref HEAD)
HASH=$(git rev-parse HEAD)
/data/data/com.termux/files/usr/bin/git fetch
REMOTE_HASH=$(git rev-parse --verify origin/$BRANCH)
/data/data/com.termux/files/usr/bin/git pull
if [ "$HASH" != "$REMOTE_HASH" ]; then
if [ -f "/data/openpilot/prebuilt" ]; then
pkill -f thermald
rm -f /data/openpilot/prebuilt
fi
reboot
fi