mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 02:59:53 +07:00
update: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
536d18a946
commit
5f301893ea
@ -5,7 +5,6 @@
|
||||
###############################################################################
|
||||
# Upgrade Loader
|
||||
function upgradeLoader () {
|
||||
(
|
||||
local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
TAG=""
|
||||
if [ -z "${1}" ]; then
|
||||
@ -18,20 +17,16 @@ function upgradeLoader () {
|
||||
TAG="$(curl --interface ${ARCNIC} -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
echo "New Version: ${TAG}"
|
||||
break
|
||||
fi
|
||||
sleep 3
|
||||
idx=$((${idx} + 1))
|
||||
done
|
||||
if [ -z "${TAG}" ]; then
|
||||
echo "Error checking new Version!"
|
||||
sleep 5
|
||||
updateFailed
|
||||
fi
|
||||
else
|
||||
TAG="${1}"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
(
|
||||
# Download update file
|
||||
echo "Downloading ${TAG}"
|
||||
if [ "${ARCNIC}" == "auto" ]; then
|
||||
@ -66,12 +61,13 @@ function upgradeLoader () {
|
||||
sleep 2
|
||||
) 2>&1 | dialog --backtitle "$(backtitle)" --title "Upgrade Loader" \
|
||||
--progressbox "Upgrading Loader..." 20 70
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Update Loader
|
||||
function updateLoader() {
|
||||
(
|
||||
local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
TAG=""
|
||||
if [ -z "${1}" ]; then
|
||||
@ -84,20 +80,16 @@ function updateLoader() {
|
||||
TAG="$(curl --interface ${ARCNIC} -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
echo "New Version: ${TAG}"
|
||||
break
|
||||
fi
|
||||
sleep 3
|
||||
idx=$((${idx} + 1))
|
||||
done
|
||||
if [ -z "${TAG}" ]; then
|
||||
echo "Error checking new Version!"
|
||||
sleep 5
|
||||
updateFailed
|
||||
fi
|
||||
else
|
||||
TAG="${1}"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
(
|
||||
# Download update file
|
||||
echo "Downloading ${TAG}"
|
||||
if [ "${ARCNIC}" == "auto" ]; then
|
||||
@ -134,13 +126,13 @@ function updateLoader() {
|
||||
sleep 2
|
||||
) 2>&1 | dialog --backtitle "$(backtitle)" --title "Update Loader" \
|
||||
--progressbox "Updating Loader..." 20 70
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Update Addons
|
||||
function updateAddons() {
|
||||
(
|
||||
local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
TAG=""
|
||||
if [ -z "${1}" ]; then
|
||||
@ -153,20 +145,16 @@ function updateAddons() {
|
||||
TAG="$(curl --interface ${ARCNIC} -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-addons/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
echo "New Version: ${TAG}"
|
||||
break
|
||||
fi
|
||||
sleep 3
|
||||
idx=$((${idx} + 1))
|
||||
done
|
||||
if [ -z "${TAG}" ]; then
|
||||
echo "Error checking new Version!"
|
||||
sleep 5
|
||||
updateFailed
|
||||
fi
|
||||
else
|
||||
TAG="${1}"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
(
|
||||
# Download update file
|
||||
echo "Downloading ${TAG}"
|
||||
if [ "${ARCNIC}" == "auto" ]; then
|
||||
@ -208,13 +196,13 @@ function updateAddons() {
|
||||
sleep 2
|
||||
) 2>&1 | dialog --backtitle "$(backtitle)" --title "Update Addons" \
|
||||
--progressbox "Updating Addons..." 20 70
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Update Patches
|
||||
function updatePatches() {
|
||||
(
|
||||
local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
TAG=""
|
||||
if [ -z "${1}" ]; then
|
||||
@ -227,20 +215,16 @@ function updatePatches() {
|
||||
TAG="$(curl --interface ${ARCNIC} -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-patches/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
echo "New Version: ${TAG}"
|
||||
break
|
||||
fi
|
||||
sleep 3
|
||||
idx=$((${idx} + 1))
|
||||
done
|
||||
if [ -z "${TAG}" ]; then
|
||||
echo "Error checking new Version!"
|
||||
sleep 5
|
||||
updateFailed
|
||||
fi
|
||||
else
|
||||
TAG="${1}"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
(
|
||||
# Download update file
|
||||
echo "Downloading ${TAG}"
|
||||
if [ "${ARCNIC}" == "auto" ]; then
|
||||
@ -274,13 +258,13 @@ function updatePatches() {
|
||||
sleep 2
|
||||
) 2>&1 | dialog --backtitle "$(backtitle)" --title "Update Patches" \
|
||||
--progressbox "Updating Patches..." 20 70
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Update Modules
|
||||
function updateModules() {
|
||||
(
|
||||
local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
TAG=""
|
||||
if [ -z "${1}" ]; then
|
||||
@ -293,20 +277,16 @@ function updateModules() {
|
||||
TAG="$(curl --interface ${ARCNIC} -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-modules/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
echo "New Version: ${TAG}"
|
||||
break
|
||||
fi
|
||||
sleep 3
|
||||
idx=$((${idx} + 1))
|
||||
done
|
||||
if [ -z "${TAG}" ]; then
|
||||
echo "Error checking new Version!"
|
||||
sleep 5
|
||||
updateFailed
|
||||
fi
|
||||
else
|
||||
TAG="${1}"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
(
|
||||
# Download update file
|
||||
echo "Downloading ${TAG}"
|
||||
if [ "${ARCNIC}" == "auto" ]; then
|
||||
@ -359,13 +339,13 @@ function updateModules() {
|
||||
sleep 2
|
||||
) 2>&1 | dialog --backtitle "$(backtitle)" --title "Update Modules" \
|
||||
--progressbox "Updating Modules..." 20 70
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Update Configs
|
||||
function updateConfigs() {
|
||||
(
|
||||
local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
TAG=""
|
||||
if [ -z "${1}" ]; then
|
||||
@ -378,20 +358,16 @@ function updateConfigs() {
|
||||
TAG="$(curl --interface ${ARCNIC} -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-configs/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
echo "New Version: ${TAG}"
|
||||
break
|
||||
fi
|
||||
sleep 3
|
||||
idx=$((${idx} + 1))
|
||||
done
|
||||
if [ -z "${TAG}" ]; then
|
||||
echo "Error checking new Version!"
|
||||
sleep 5
|
||||
updateFailed
|
||||
fi
|
||||
else
|
||||
TAG="${1}"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
(
|
||||
# Download update file
|
||||
echo "Downloading ${TAG}"
|
||||
if [ "${ARCNIC}" == "auto" ]; then
|
||||
@ -425,13 +401,13 @@ function updateConfigs() {
|
||||
sleep 2
|
||||
) 2>&1 | dialog --backtitle "$(backtitle)" --title "Update Configs" \
|
||||
--progressbox "Updating Configs..." 20 70
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Update LKMs
|
||||
function updateLKMs() {
|
||||
(
|
||||
local ARCNIC="$(readConfigKey "arc.nic" "${USER_CONFIG_FILE}")"
|
||||
TAG=""
|
||||
if [ -z "${1}" ]; then
|
||||
@ -444,20 +420,16 @@ function updateLKMs() {
|
||||
TAG="$(curl --interface ${ARCNIC} -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-lkm/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
echo "New Version: ${TAG}"
|
||||
break
|
||||
fi
|
||||
sleep 3
|
||||
idx=$((${idx} + 1))
|
||||
done
|
||||
if [ -z "${TAG}" ]; then
|
||||
echo "Error checking new Version!"
|
||||
sleep 5
|
||||
updateFailed
|
||||
fi
|
||||
else
|
||||
TAG="${1}"
|
||||
fi
|
||||
if [ -n "${TAG}" ]; then
|
||||
(
|
||||
# Download update file
|
||||
echo "Downloading ${TAG}"
|
||||
if [ "${ARCNIC}" == "auto" ]; then
|
||||
@ -489,6 +461,7 @@ function updateLKMs() {
|
||||
sleep 2
|
||||
) 2>&1 | dialog --backtitle "$(backtitle)" --title "Update LKMs" \
|
||||
--progressbox "Updating LKMs..." 20 70
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user