mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 00:09:53 +07:00
arc-functions: remove advanced update features
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
07112560e4
commit
cb3611b88a
@ -818,12 +818,6 @@ function updateMenu() {
|
||||
1 "Automated Update Mode" \
|
||||
2 "Full-Update Loader \Z1(update)\Zn" \
|
||||
3 "Full-Upgrade Loader \Z1(reflash)\Zn" \
|
||||
4 "\Z4Advanced:\Zn Update Addons" \
|
||||
5 "\Z4Advanced:\Zn Update Configs" \
|
||||
6 "\Z4Advanced:\Zn Update LKMs" \
|
||||
7 "\Z4Advanced:\Zn Update Modules" \
|
||||
8 "\Z4Advanced:\Zn Update Patches" \
|
||||
9 "\Z4Advanced:\Zn Update Custom Kernel" \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && break
|
||||
case "$(cat ${TMP_PATH}/resp)" in
|
||||
@ -886,166 +880,6 @@ function updateMenu() {
|
||||
exec reboot && exit 0
|
||||
fi
|
||||
;;
|
||||
4)
|
||||
# Ask for Tag
|
||||
TAG=""
|
||||
NEWVER="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-addons/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
OLDVER="$(cat ${ADDONS_PATH}/VERSION)"
|
||||
dialog --clear --backtitle "$(backtitle)" --title "Update Addons" \
|
||||
--menu "Current: ${OLDVER} -> Which Version?" 7 50 0 \
|
||||
1 "Latest ${NEWVER}" \
|
||||
2 "Select Version" \
|
||||
2>"${TMP_PATH}/opts"
|
||||
[ $? -ne 0 ] && break
|
||||
opts=$(cat ${TMP_PATH}/opts)
|
||||
if [ ${opts} -eq 1 ]; then
|
||||
TAG=""
|
||||
elif [ ${opts} -eq 2 ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Update Addons" \
|
||||
--inputbox "Type the Version!" 0 0 \
|
||||
2>"${TMP_PATH}/input"
|
||||
TAG=$(cat "${TMP_PATH}/input")
|
||||
[ -z "${TAG}" ] && return 1
|
||||
fi
|
||||
if updateAddons "${TAG}"; then
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
fi
|
||||
;;
|
||||
5)
|
||||
# Ask for Tag
|
||||
TAG=""
|
||||
NEWVER="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-configs/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
OLDVER="$(cat ${MODEL_CONFIG_PATH}/VERSION)"
|
||||
dialog --clear --backtitle "$(backtitle)" --title "Update Configs" \
|
||||
--menu "Current: ${OLDVER} -> Which Version?" 7 50 0 \
|
||||
1 "Latest ${NEWVER}" \
|
||||
2 "Select Version" \
|
||||
2>"${TMP_PATH}/opts"
|
||||
[ $? -ne 0 ] && break
|
||||
opts=$(cat ${TMP_PATH}/opts)
|
||||
if [ ${opts} -eq 1 ]; then
|
||||
TAG=""
|
||||
elif [ ${opts} -eq 2 ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Update Configs" \
|
||||
--inputbox "Type the Version!" 0 0 \
|
||||
2>"${TMP_PATH}/input"
|
||||
TAG=$(cat "${TMP_PATH}/input")
|
||||
[ -z "${TAG}" ] && return 1
|
||||
fi
|
||||
if updateConfigs "${TAG}"; then
|
||||
writeConfigKey "arc.key" "" "${USER_CONFIG_FILE}"
|
||||
ARCKEY="$(readConfigKey "arc.key" "${USER_CONFIG_FILE}")"
|
||||
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
|
||||
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
fi
|
||||
;;
|
||||
6)
|
||||
# Ask for Tag
|
||||
TAG=""
|
||||
NEWVER="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-lkm/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
OLDVER="$(cat ${LKMS_PATH}/VERSION)"
|
||||
dialog --clear --backtitle "$(backtitle)" --title "Update LKMs" \
|
||||
--menu "Current: ${OLDVER} -> Which Version?" 7 50 0 \
|
||||
1 "Latest ${NEWVER}" \
|
||||
2 "Select Version" \
|
||||
2>"${TMP_PATH}/opts"
|
||||
[ $? -ne 0 ] && break
|
||||
opts=$(cat ${TMP_PATH}/opts)
|
||||
if [ ${opts} -eq 1 ]; then
|
||||
TAG=""
|
||||
elif [ ${opts} -eq 2 ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Update LKMs" \
|
||||
--inputbox "Type the Version!" 0 0 \
|
||||
2>"${TMP_PATH}/input"
|
||||
TAG=$(cat "${TMP_PATH}/input")
|
||||
[ -z "${TAG}" ] && return 1
|
||||
fi
|
||||
if updateLKMs "${TAG}"; then
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
fi
|
||||
;;
|
||||
7)
|
||||
# Ask for Tag
|
||||
TAG=""
|
||||
NEWVER="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-modules/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
OLDVER="$(cat ${MODULES_PATH}/VERSION)"
|
||||
dialog --clear --backtitle "$(backtitle)" --title "Update Modules" \
|
||||
--menu "Current: ${OLDVER} -> Which Version?" 7 50 0 \
|
||||
1 "Latest ${NEWVER}" \
|
||||
2 "Select Version" \
|
||||
2>"${TMP_PATH}/opts"
|
||||
[ $? -ne 0 ] && break
|
||||
opts=$(cat ${TMP_PATH}/opts)
|
||||
if [ ${opts} -eq 1 ]; then
|
||||
TAG=""
|
||||
elif [ ${opts} -eq 2 ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Update Modules" \
|
||||
--inputbox "Type the Version!" 0 0 \
|
||||
2>"${TMP_PATH}/input"
|
||||
TAG=$(cat "${TMP_PATH}/input")
|
||||
[ -z "${TAG}" ] && return 1
|
||||
fi
|
||||
if updateModules "${TAG}"; then
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
fi
|
||||
;;
|
||||
8)
|
||||
# Ask for Tag
|
||||
TAG=""
|
||||
NEWVER="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-patches/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
OLDVER="$(cat ${PATCH_PATH}/VERSION)"
|
||||
dialog --clear --backtitle "$(backtitle)" --title "Update Patches" \
|
||||
--menu "Current: ${OLDVER} -> Which Version?" 7 50 0 \
|
||||
1 "Latest ${NEWVER}" \
|
||||
2 "Select Version" \
|
||||
2>"${TMP_PATH}/opts"
|
||||
[ $? -ne 0 ] && break
|
||||
opts=$(cat ${TMP_PATH}/opts)
|
||||
if [ ${opts} -eq 1 ]; then
|
||||
TAG=""
|
||||
elif [ ${opts} -eq 2 ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Update Patches" \
|
||||
--inputbox "Type the Version!" 0 0 \
|
||||
2>"${TMP_PATH}/input"
|
||||
TAG=$(cat "${TMP_PATH}/input")
|
||||
[ -z "${TAG}" ] && return 1
|
||||
fi
|
||||
if updatePatches "${TAG}"; then
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
fi
|
||||
;;
|
||||
9)
|
||||
# Ask for Tag
|
||||
TAG=""
|
||||
NEWVER="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-custom/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
OLDVER="$(cat ${CUSTOM_PATH}/VERSION)"
|
||||
dialog --clear --backtitle "$(backtitle)" --title "Update Custom" \
|
||||
--menu "Current: ${OLDVER} -> Which Version?" 7 50 0 \
|
||||
1 "Latest ${NEWVER}" \
|
||||
2 "Select Version" \
|
||||
2>"${TMP_PATH}/opts"
|
||||
[ $? -ne 0 ] && break
|
||||
opts=$(cat ${TMP_PATH}/opts)
|
||||
if [ ${opts} -eq 1 ]; then
|
||||
TAG=""
|
||||
elif [ ${opts} -eq 2 ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Update Custom Kernel" \
|
||||
--inputbox "Type the Version!" 0 0 \
|
||||
2>"${TMP_PATH}/input"
|
||||
TAG=$(cat "${TMP_PATH}/input")
|
||||
[ -z "${TAG}" ] && return 1
|
||||
fi
|
||||
if updateCustom "${TAG}"; then
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
fi
|
||||
;;
|
||||
0)
|
||||
# Ask for Arc Branch
|
||||
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
|
||||
|
Loading…
Reference in New Issue
Block a user