mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-23 21:59:53 +07:00
arc: rewrite more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
465b147960
commit
ae0f6a30fe
@ -2043,15 +2043,12 @@ function getpatfiles() {
|
||||
fi
|
||||
elif [ ! -f "${DSM_FILE}" ] && [ "${ARCOFFLINE}" == "true" ]; then
|
||||
rm -f ${USER_UP_PATH}/*.tar
|
||||
while true; do
|
||||
dialog --backtitle "$(backtitle)" --colors --title "DSM Version" \
|
||||
--msgbox "Please upload the DSM Boot File to ${USER_UP_PATH}.\nLink: https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/files/${MODEL/+/%2B}/${PRODUCTVER}/${PAT_HASH}.tar\nUse ${IPCON}:7304 and OK after Upload" 0 0
|
||||
[ $? -ne 0 ] && break
|
||||
if [ -f "${DSM_FILE}" ]; then
|
||||
VALID="true"
|
||||
break
|
||||
fi
|
||||
done
|
||||
dialog --backtitle "$(backtitle)" --colors --title "DSM Version" \
|
||||
--msgbox "Please upload the DSM Boot File to ${USER_UP_PATH}.\nLink: https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/files/${MODEL/+/%2B}/${PRODUCTVER}/${PAT_HASH}.tar\nUse ${IPCON}:7304 and OK after Upload" 0 0
|
||||
[ $? -ne 0 ] && VALID="false"
|
||||
if [ -f "${DSM_FILE}" ]; then
|
||||
VALID="true"
|
||||
fi
|
||||
elif [ -f "${DSM_FILE}" ]; then
|
||||
VALID="true"
|
||||
fi
|
||||
@ -2064,7 +2061,7 @@ function getpatfiles() {
|
||||
else
|
||||
dialog --backtitle "$(backtitle)" --title "DSM Extraction" --aspect 18 \
|
||||
--infobox "DSM Extraction failed!\nExit." 4 40
|
||||
sleep 5
|
||||
sleep 2
|
||||
fi
|
||||
# Cleanup
|
||||
[ -d "${UNTAR_PAT_PATH}" ] && rm -rf "${UNTAR_PAT_PATH}"
|
||||
|
@ -343,6 +343,10 @@ function arcVersion() {
|
||||
writeConfigKey "paturl" "${PAT_URL}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "pathash" "${PAT_HASH}" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
elif [ "${ARCOFFLINE}" == "true" ]; then
|
||||
VALID="true"
|
||||
writeConfigKey "paturl" "${PAT_URL}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "pathash" "${PAT_HASH}" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
elif [ "${ARCMODE}" == "automated" ] || [ "${ARCRESTORE}" == "true" ]; then
|
||||
VALID="true"
|
||||
@ -355,7 +359,6 @@ function arcVersion() {
|
||||
rm -f "${PART1_PATH}/grub_cksum.syno" "${PART1_PATH}/GRUB_VER" >/dev/null 2>&1 || true
|
||||
rm -f "${USER_UP_PATH}/"*.tar >/dev/null 2>&1 || true
|
||||
fi
|
||||
getpatfiles
|
||||
# Change Config if Files are valid
|
||||
if [ "${VALID}" == "true" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Arc Config" \
|
||||
|
Loading…
Reference in New Issue
Block a user