mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 22:26:42 +00:00
Merge pull request #1995 from MilhouseVH/le90_upgrade_single_shot
init: recover from a failed upgrade
This commit is contained in:
commit
aedad0fea8
@ -779,8 +779,16 @@
|
||||
return 0
|
||||
fi
|
||||
|
||||
# remove temporary folder if exist from previous run
|
||||
rm -fr "$UPDATE_DIR/.tmp" &>/dev/null
|
||||
if [ -d $UPDATE_DIR/.tmp ]; then
|
||||
echo "Failed update detected - performing recovery."
|
||||
echo ""
|
||||
do_cleanup
|
||||
StartProgress countdown "Normal startup in 10s... " 10 "NOW"
|
||||
return 0
|
||||
fi
|
||||
|
||||
mkdir -p $UPDATE_DIR/.tmp &>/dev/null
|
||||
sync
|
||||
|
||||
echo "UPGRADE IN PROGRESS"
|
||||
echo ""
|
||||
@ -793,7 +801,6 @@
|
||||
echo "Found new .tar archive"
|
||||
UPDATE_FILENAME="$UPDATE_TAR"
|
||||
StartProgress spinner "Extracting contents of archive... "
|
||||
mkdir -p $UPDATE_DIR/.tmp &>/dev/null
|
||||
tar -xf "$UPDATE_TAR" -C $UPDATE_DIR/.tmp 1>/dev/null 2>/tmp/tarresult.txt || TARRESULT="1"
|
||||
|
||||
if [ "${TARRESULT}" -eq "0" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user