Skip to content

Commit feb95ed

Browse files
committed
arc-functions: rewrite zip update
Signed-off-by: AuxXxilium <[email protected]>
1 parent 8d4172e commit feb95ed

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

files/initrd/opt/arc/arc-functions.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,12 +1710,12 @@ function updateMenu() {
17101710
[ -z "${TAG}" ] && return 1
17111711
updateLoader "${TAG}"
17121712
elif [ "${opts}" -eq 4 ]; then
1713-
mkdir -p "${PART3_PATH}/users"
1713+
mkdir -p "/tmp/update"
17141714
dialog --backtitle "$(backtitle)" --title "Update Loader" \
1715-
--msgbox "Upload the update-*.zip File to ${PART3_PATH}/users\nand press OK after upload is done." 0 0
1715+
--msgbox "Upload the update-*.zip File to /tmp/update\nand press OK after upload is done." 0 0
17161716
[ $? -ne 0 ] && return 1
17171717
UPDATEFOUND="false"
1718-
for UPDATEFILE in ${PART3_PATH}/users/update-*.zip; do
1718+
for UPDATEFILE in /tmp/update/update-*.zip; do
17191719
if [ -e "${UPDATEFILE}" ]; then
17201720
mv -f "${UPDATEFILE}" "${TMP_PATH}/update.zip"
17211721
TAG="zip"
@@ -1737,14 +1737,14 @@ function updateMenu() {
17371737
TAG="$(curl -m 10 -skL "${API_URL}" | jq -r ".[].tag_name" | grep -v "dev" | sort -rV | head -1)"
17381738
BETATAG="$(curl -m 10 -skL "${BETA_API_URL}" | jq -r ".[].tag_name" | grep -v "dev" | sort -rV | head -1)"
17391739
dialog --clear --backtitle "$(backtitle)" --title "Upgrade Loader" --colors \
1740-
--menu "\Z1Loader will be reset to defaults after upgrade!\nIf you use Hardware encryption, your key will be deleted!\Zn\nCurrent: ${ARC_VERSION}" 10 50 0 \
1740+
--menu "\Z1Loader will be reset to defaults after upgrade!\nIf you use Hardware encryption, your key will be deleted!\Zn\nCurrent: ${ARC_VERSION}" 10 65 0 \
17411741
1 "Latest ${TAG}" \
17421742
2 "Select Version" \
17431743
3 "Upload .zip File" \
17441744
2>"${TMP_PATH}/opts"
17451745
else
17461746
dialog --clear --backtitle "$(backtitle)" --title "Upgrade Loader" --colors \
1747-
--menu "\Z1Loader will be reset to default after upgrade!\nIf you use Hardware encryption, your key will be deleted!\Zn\nCurrent: ${ARC_VERSION}" 10 50 0 \
1747+
--menu "\Z1Loader will be reset to default after upgrade!\nIf you use Hardware encryption, your key will be deleted!\Zn\nCurrent: ${ARC_VERSION}" 10 65 0 \
17481748
3 "Upload .zip File" \
17491749
2>"${TMP_PATH}/opts"
17501750
fi
@@ -1761,14 +1761,14 @@ function updateMenu() {
17611761
[ -z "${TAG}" ] && return 1
17621762
upgradeLoader "${TAG}"
17631763
elif [ "${opts}" -eq 3 ]; then
1764-
mkdir -p "${PART3_PATH}/users"
1764+
mkdir -p "/tmp/update"
17651765
dialog --backtitle "$(backtitle)" --title "Upgrade Loader" \
1766-
--msgbox "Upload the arc-*.zip File to ${PART3_PATH}/users\nand press OK after upload is done." 0 0
1766+
--msgbox "Upload the arc-*.zip File to /tmp/update\nand press OK after upload is done." 0 0
17671767
[ $? -ne 0 ] && return 1
17681768
UPDATEFOUND="false"
1769-
for UPDATEFILE in ${PART3_PATH}/users/arc-*.zip; do
1769+
for UPDATEFILE in /tmp/update/arc-*.zip; do
17701770
if [ -e "${UPDATEFILE}" ]; then
1771-
mv -f "${UPDATEFILE}" "${TMP_PATH}/arc.zip"
1771+
mv -f "${UPDATEFILE}" "${TMP_PATH}/arc.img.zip"
17721772
TAG="zip"
17731773
UPDATEFOUND="true"
17741774
break

0 commit comments

Comments
 (0)