mirror of
https://github.com/AuxXxilium/arc-c.git
synced 2024-11-23 23:11:08 +07:00
commit
f646e84cfd
@ -105,15 +105,15 @@ function updateMenu() {
|
||||
dialog --backtitle "$(backtitle)" --title "Upgrade Loader" --aspect 18 \
|
||||
--infobox "Downloading ${TAG}" 0 0
|
||||
# Download update file
|
||||
STATUS=$(curl --insecure -s -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-c/releases/download/${TAG}/arc-a-${TAG}.img.zip" -o "${TMP_PATH}/arc-a-${TAG}.img.zip")
|
||||
STATUS=$(curl --insecure -s -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-c/releases/download/${TAG}/arc-c-${TAG}.img.zip" -o "${TMP_PATH}/arc-c-${TAG}.img.zip")
|
||||
if [[ $? -ne 0 || ${STATUS} -ne 200 ]]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Upgrade Loader" --aspect 18 \
|
||||
--infobox "Error downloading Updatefile!\nUse current Version." 0 0
|
||||
sleep 5
|
||||
arcModel
|
||||
fi
|
||||
unzip -oq "${TMP_PATH}/arc-a-${TAG}.img.zip" -d "${TMP_PATH}"
|
||||
rm -f "${TMP_PATH}/arc-a-${TAG}.img.zip"
|
||||
unzip -oq "${TMP_PATH}/arc-c-${TAG}.img.zip" -d "${TMP_PATH}"
|
||||
rm -f "${TMP_PATH}/arc-c-${TAG}.img.zip"
|
||||
if [ $? -ne 0 ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Upgrade Loader" --aspect 18 \
|
||||
--infobox "Error extracting Updatefile!\nUse current Version." 0 0
|
||||
@ -125,8 +125,6 @@ function updateMenu() {
|
||||
# Process complete update
|
||||
umount "${PART1_PATH}" "${PART2_PATH}" "${PART3_PATH}"
|
||||
dd if="${TMP_PATH}/arc.img" of=$(blkid | grep 'LABEL="ARC3"' | cut -d3 -f1) bs=1M conv=fsync
|
||||
# Ask for Boot
|
||||
rm -f "${TMP_PATH}/arc.img"
|
||||
exec reboot
|
||||
exit 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user