arc: fix pat sanity check

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium
2024-05-21 22:22:30 +02:00
parent da1cad5b1e
commit d70893a39d

View File

@@ -642,7 +642,7 @@ function make() {
PAT_HASH=$(echo ${PAT_DATA} | jq -r '.info.system.detail[0].items[0].files[0].checksum')
PAT_URL=${PAT_URL%%\?*}
if [ -n "${PAT_URL}" ] && [ -n "${PAT_HASH}" ]; then
if echo "${PAT_URL}" | grep -wq "https://"; then
if echo "${PAT_URL}" | grep -q "https://*"; then
break
fi
fi
@@ -660,7 +660,7 @@ function make() {
PAT_HASH="$(curl -m 5 -skL "https://raw.githubusercontent.com/AuxXxilium/arc-dsm/main/dsm/${MODELID/+/%2B}/${PRODUCTVER}/pat_hash")"
PAT_URL=${PAT_URL%%\?*}
if [ -n "${PAT_URL}" ] && [ -n "${PAT_HASH}" ]; then
if echo "${PAT_URL}" | grep -wq "https://"; then
if echo "${PAT_URL}" | grep -q "https://*"; then
break
fi
fi
@@ -673,7 +673,7 @@ function make() {
MSG="Failed to get PAT Data.\nPlease manually fill in the URL and Hash of PAT."
PAT_URL=""
PAT_HASH=""
elif echo "${PAT_URL}" | grep -wq "https://"; then
elif echo "${PAT_URL}" | grep -q "https://*"; then
MSG="Successfully got PAT Data.\nPlease confirm or modify if needed."
else
MSG="Failed to get PAT Data.\nPlease manually fill in the URL and Hash of PAT."
@@ -1199,4 +1199,4 @@ echo -e "User: \033[1;34mroot\033[0m"
echo -e "Password: \033[1;34marc\033[0m"
echo
echo -e "Web Terminal:"
echo -e "Address: \033[1;34mhttp://${IPCON}:7681\033[0m"
echo -e "Address: \033[1;34mhttp://${IPCON}:7681\033[0m"