autoupdate: fix

This commit is contained in:
John Doe
2021-10-25 20:01:11 +08:00
parent eec7292d0e
commit 0a5c182473
3 changed files with 11 additions and 9 deletions

View File

@@ -20,12 +20,12 @@ fi
unzip R2S*.zip
rm R2S*.zip
if [ -f /mnt/mmcblk0p2/artifact/FriendlyWrt*.img.gz ]; then
cd /mnt/mmcblk0p2/artifact/
if [ `md5sum -c md5sum.txt|grep -c "OK"` -eq 0 ]; then
echo -e '\e[91m固件HASH值匹配失败脚本退出\e[0m'
cd /mnt/mmcblk0p2/artifact/
if [ `md5sum -c md5sum.txt|grep -c "OK"` -eq 0 ]; then
echo -e '\e[91m固件HASH值匹配失败脚本退出\e[0m'
exit 1
fi
cd /mnt/mmcblk0p2
fi
cd /mnt/mmcblk0p2
pv /mnt/mmcblk0p2/artifact/FriendlyWrt*.img.gz | gunzip -dc > FriendlyWrt.img
echo -e '\e[92m准备解压镜像文件\e[0m'
fi