arc: rework branch system
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
@@ -837,7 +837,7 @@ function updateMenu() {
|
||||
7 "Update Modules" \
|
||||
8 "Update Patches" \
|
||||
9 "Update Custom Kernel" \
|
||||
0 "Branch: (${ARCBRANCH:-"stable"})" \
|
||||
0 "Branch: ${ARCBRANCH}" \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && break
|
||||
case "$(cat ${TMP_PATH}/resp)" in
|
||||
@@ -1065,11 +1065,9 @@ function updateMenu() {
|
||||
opts=$(cat ${TMP_PATH}/opts)
|
||||
[ -z "${opts}" ] && return 1
|
||||
if [ ${opts} -eq 1 ]; then
|
||||
writeConfigKey "arc.branch" "" "${USER_CONFIG_FILE}"
|
||||
rm -f "${PART1_PATH}/ARC-BRANCH"
|
||||
writeConfigKey "arc.branch" "stable" "${USER_CONFIG_FILE}"
|
||||
elif [ ${opts} -eq 2 ]; then
|
||||
writeConfigKey "arc.branch" "next" "${USER_CONFIG_FILE}"
|
||||
echo "next" >"${PART1_PATH}/ARC-BRANCH"
|
||||
fi
|
||||
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
|
||||
dialog --backtitle "$(backtitle)" --title "Switch Buildsystem" --aspect 18 \
|
||||
@@ -1216,7 +1214,7 @@ function sysinfo() {
|
||||
done
|
||||
# Print Config Informations
|
||||
TEXT+="\n\Z4> Arc: ${ARC_VERSION}\Zn"
|
||||
[ -n "${ARCBRANCH}" ] && TEXT+="\n Branch: \Zb${ARCBRANCH}\Zn"
|
||||
TEXT+="\n Branch: \Zb${ARCBRANCH}\Zn"
|
||||
TEXT+="\n Subversion: \ZbAddons ${ADDONSVERSION} | Configs ${CONFIGSVERSION} | LKM ${LKMVERSION} | Modules ${MODULESVERSION} | Patches ${PATCHESVERSION}\Zn"
|
||||
TEXT+="\n Config | Build: \Zb${CONFDONE} | ${BUILDDONE}\Zn"
|
||||
TEXT+="\n Config Version: \Zb${CONFIGVER}\Zn"
|
||||
|
||||
@@ -12,6 +12,7 @@ rm -rf /sys/fs/pstore/* >/dev/null 2>&1 || true
|
||||
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
[ "${BUILDDONE}" = "false" ] && die "Loader build not completed!"
|
||||
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
|
||||
|
||||
# Get Loader Disk Bus
|
||||
[ -z "${LOADER_DISK}" ] && die "Loader Disk not found!"
|
||||
@@ -24,7 +25,7 @@ clear
|
||||
COLUMNS=${COLUMNS:-50}
|
||||
BANNER="$(figlet -c -w "$(((${COLUMNS})))" "Arc Loader")"
|
||||
TITLE="Version:"
|
||||
TITLE+=" ${ARC_TITLE}"
|
||||
TITLE+=" ${ARC_TITLE} | ${ARCBRANCH}"
|
||||
printf "\033[1;30m%*s\n" ${COLUMNS} ""
|
||||
printf "\033[1;30m%*s\033[A\n" ${COLUMNS} ""
|
||||
printf "\033[1;34m%*s\033[0m\n" ${COLUMNS} "${BANNER}"
|
||||
|
||||
@@ -44,7 +44,7 @@ function upgradeLoader () {
|
||||
(
|
||||
# Download update file
|
||||
echo "Downloading ${TAG}"
|
||||
if [ -n "${ARCBRANCH}" ]; then
|
||||
if [ "${ARCBRANCH}" != "stable" ]; then
|
||||
local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/arc-${TAG}-${ARCBRANCH}.img.zip"
|
||||
else
|
||||
local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/arc-${TAG}.img.zip"
|
||||
@@ -141,7 +141,7 @@ function updateLoader() {
|
||||
(
|
||||
# Download update file
|
||||
echo "Downloading ${TAG}"
|
||||
if [ -n "${ARCBRANCH}" ]; then
|
||||
if [ "${ARCBRANCH}" != "stable" ]; then
|
||||
local URL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/update-${ARCBRANCH}.zip"
|
||||
local SHA="https://github.com/AuxXxilium/arc/releases/download/${TAG}/checksum-${ARCBRANCH}.sha256"
|
||||
else
|
||||
|
||||
@@ -37,6 +37,7 @@ fi
|
||||
# Config Init
|
||||
initConfigKey "addons" "{}" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc" "{}" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.branch" "" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.confdone" "false" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "arc.dynamic" "false" "${USER_CONFIG_FILE}"
|
||||
@@ -85,7 +86,10 @@ if grep -q "automated_arc" /proc/cmdline; then
|
||||
else
|
||||
writeConfigKey "automated" "false" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
[ -f "${PART1_PATH}/ARC-BRANCH" ] && writeConfigKey "arc.branch" "next" "${USER_CONFIG_FILE}" || writeConfigKey "arc.branch" "" "${USER_CONFIG_FILE}"
|
||||
if [ -f "${PART1_PATH}/ARC-BRANCH" ]; then
|
||||
ARCBRANCH=$(cat "${PART1_PATH}/ARC-BRANCH") && writeConfigKey "arc.branch" "ARCBRANCH" "${USER_CONFIG_FILE}"
|
||||
rm -f "${PART1_PATH}/ARC-BRANCH" >/dev/null 2>&1 || true
|
||||
fi
|
||||
[ -f "${PART3_PATH}/automated" ] && rm -f "${PART3_PATH}/automated" >/dev/null 2>&1 || true
|
||||
# Check for compatibility
|
||||
compatboot
|
||||
|
||||
Reference in New Issue
Block a user