fix upgrade mode to prevent deleted wz_mini dir on failed upgrade

This commit is contained in:
Alfonso Gamboa 2022-06-23 23:46:47 -07:00
parent a571a051bc
commit 5858bd6e22
2 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,7 @@ wget --no-check-certificate https://github.com/gtxaspec/wz_mini_hacks/archive/re
echo "Extract $BRANCH archive"
mkdir /opt/.Upgrade/wz_mini_hacks
tar -xf /opt/.Upgrade/wz_mini.tar.gz -C /opt/.Upgrade/wz_mini_hacks --strip-components 1
tar -xvf /opt/.Upgrade/wz_mini.tar.gz -C /opt/.Upgrade/wz_mini_hacks --strip-components 1
echo "Verify extracted file integrity"
cd /opt/.Upgrade/wz_mini_hacks
@ -113,7 +113,8 @@ else
echo "Failure: Extracted files may be corrupt. Aborting upgrade."
echo "Delete failed upgrade directory"
rm -rf /opt/Upgrade
reboot
reboot &
exit 1
fi
if [ -f /opt/wz_mini/tmp/.T20 ]; then

View File

@ -52,7 +52,7 @@ a8970288e72c871bff6a4484f1e733d6 SD_ROOT/wz_mini/bin/readelf
41b56bb30f02bce5f5e2598073151e16 SD_ROOT/wz_mini/bin/ffmpeg
e37474a12d76cae16336476cba61e8b8 SD_ROOT/wz_mini/bin/neofetch
7fcc716cda1e024dae1045050a135beb SD_ROOT/wz_mini/bin/audioplay_t31
16fa502312c2d14ef54c26b609999584 SD_ROOT/wz_mini/bin/upgrade-run.sh
d515ed5eafec6348383f1e5f10507a4d SD_ROOT/wz_mini/bin/upgrade-run.sh
e6a6a9dd8ce138686083a3d4303cea40 SD_ROOT/wz_mini/bin/iperf3
0468ffb319707687557353242a518923 SD_ROOT/wz_mini/bin/wg
65510c6c4d0db4b4679fc92d1c617fdd SD_ROOT/wz_mini/bin/rtmp-stream.sh