mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
+4
-1
@@ -5,11 +5,14 @@ if [ -z "$PASSIVE" ]; then
|
||||
fi
|
||||
|
||||
function launch {
|
||||
DO_UPDATE=$(cat /data/params/d/ShouldDoUpdate)
|
||||
# apply update
|
||||
if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
|
||||
if [ "$DO_UPDATE" == "1" ] && [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
|
||||
git reset --hard @{u} &&
|
||||
git clean -xdf &&
|
||||
exec "${BASH_SOURCE[0]}"
|
||||
echo -n 0 > /data/params/d/ShouldDoUpdate
|
||||
echo -n 0 > /data/params/d/IsUpdateAvailable
|
||||
fi
|
||||
|
||||
# no cpu rationing for now
|
||||
|
||||
Reference in New Issue
Block a user