arc: more rework

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-10-27 22:49:12 +01:00
parent ae0f6a30fe
commit 998bdceba7
3 changed files with 21 additions and 9 deletions

View File

@ -2044,7 +2044,7 @@ function getpatfiles() {
elif [ ! -f "${DSM_FILE}" ] && [ "${ARCOFFLINE}" == "true" ]; then
rm -f ${USER_UP_PATH}/*.tar
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
--msgbox "Please upload the DSM Boot File to ${USER_UP_PATH}.\nUse ${IPCON}:7304 to upload and press OK after it's finished.\nLink: https://github.com/AuxXxilium/arc-dsm/tree/main/files/${MODEL}/${PRODUCTVER}/${PAT_HASH}.tar" 8 120
[ $? -ne 0 ] && VALID="false"
if [ -f "${DSM_FILE}" ]; then
VALID="true"
@ -2062,10 +2062,11 @@ function getpatfiles() {
dialog --backtitle "$(backtitle)" --title "DSM Extraction" --aspect 18 \
--infobox "DSM Extraction failed!\nExit." 4 40
sleep 2
return 1
fi
# Cleanup
[ -d "${UNTAR_PAT_PATH}" ] && rm -rf "${UNTAR_PAT_PATH}"
return
return 0
}
###############################################################################

View File

@ -311,7 +311,7 @@ function arcVersion() {
if [ -z "${PAT_URL}" ] || [ -z "${PAT_HASH}" ]; then
MSG="Failed to get PAT Data.\n"
MSG+="Please manually fill in the URL and Hash of PAT.\n"
MSG+="You will find these Data at: https://auxxxilium.tech/wiki/arc-loader-arc-loader/url-hash-liste"
MSG+="You will find these Data at: https://github.com/AuxXxilium/arc-dsm/blob/main/webdata.txt"
dialog --backtitle "$(backtitle)" --colors --title "Arc Build" --default-button "OK" \
--form "${MSG}" 11 120 2 "Url" 1 1 "${PAT_URL}" 1 8 110 0 "Hash" 2 1 "${PAT_HASH}" 2 8 110 0 \
2>"${TMP_PATH}/resp"
@ -668,7 +668,6 @@ function arcSummary() {
SUMMARY+="\n>> DSM DT: \Zb${DT}\Zn"
SUMMARY+="\n>> DSM PAT URL: \Zb${PAT_URL}\Zn"
SUMMARY+="\n>> DSM PAT Hash: \Zb${PAT_HASH}\Zn"
SUMMARY+="\n>> DeviceTree: \Zb${DT}\Zn"
[ "${MODEL}" == "SA6400" ] && SUMMARY+="\n>> Kernel: \Zb${KERNEL}\Zn"
SUMMARY+="\n>> Kernel Version: \Zb${KVER}\Zn"
SUMMARY+="\n"
@ -755,14 +754,14 @@ function make() {
livepatch
sleep 3
) 2>&1 | dialog --backtitle "$(backtitle)" --colors --title "Build Loader" \
--progressbox "Welcome at the Dark Side..." 20 70
--progressbox "Magical things happening..." 20 70
else
dialog --backtitle "$(backtitle)" --title "Build Loader" --aspect 18 \
--infobox "Configuration issue found.\nCould not build Loader!\nExit." 5 40
# Set Build to false
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
sleep 5
sleep 2
return 1
fi
if [ -f "${ORI_ZIMAGE_FILE}" ] && [ -f "${ORI_RDGZ_FILE}" ] && [ -f "${MOD_ZIMAGE_FILE}" ] && [ -f "${MOD_RDGZ_FILE}" ]; then
@ -776,7 +775,7 @@ function make() {
# Set Build to false
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
sleep 5
sleep 2
return 1
fi
}

View File

@ -514,12 +514,24 @@ function ntpCheck() {
[ -z "${KEYMAP}" ] && KEYMAP="us"
loadkeys ${KEYMAP}
fi
if [ "${KEYMAP}" == "ua" ] || [ "${REGION}" == "Kyiv" ]; then
if [ "${KEYMAP}" == "ua" ] || [ "${REGION}" == "Kyiv" ] || [ "${REGION}" == "Kiev" ]; then
poweroff
fi
if echo "${ARC_VERSION}" | grep -v "dev"; then
while true; do
NEWTAG="$(curl -m 5 -skL "https://api.github.com/repos/AuxXxilium/arc-system/releases" | jq -r ".[].tag_name" | grep -v "dev" | sort -rV | head -1)"
NEWTAG="$(curl -m 5 -skL "https://api.github.com/repos/AuxXxilium/arc/releases" | jq -r ".[].tag_name" | grep -v "dev" | sort -rV | head -1)"
CNT=$((${CNT} + 1))
if [ -n "${NEWTAG}" ]; then
writeConfigKey "arc.offline" "false" "${USER_CONFIG_FILE}"
break
elif [ ${CNT} -ge 3 ]; then
writeConfigKey "arc.offline" "true" "${USER_CONFIG_FILE}"
break
fi
done
else
while true; do
NEWTAG="$(curl -m 5 -skL "https://api.github.com/repos/AuxXxilium/arc/releases" | jq -r ".[].tag_name" | grep "dev" | sort -rV | head -1)"
CNT=$((${CNT} + 1))
if [ -n "${NEWTAG}" ]; then
writeConfigKey "arc.offline" "false" "${USER_CONFIG_FILE}"