arc: more work for dynamic mode

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-08-03 12:48:54 +02:00
parent 14a2c97d84
commit 0f83e1b786
2 changed files with 17 additions and 11 deletions

View File

@ -66,11 +66,12 @@ BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
ntpCheck
# Check for Dynamic Mode
if [ "${ARCDYN}" == "true" ]; then
if [ "${ARCDYN}" == "true" ] && [ "${OFFLINE}" == "false" ] && [ ! -f "${PART1_PATH}/dynamic" ]; then
curl -skL "https://github.com/AuxXxilium/arc/archive/refs/heads/main.zip" -o "${TMP_PATH}/main.zip"
unzip -o "${TMP_PATH}/main.zip" -d "${TMP_PATH}/arcdyn" 2>/dev/null
cp -rf "${TMP_PATH}/arcdyn/files/initrd/opt/arc" "${ARC_PATH}"
rm -rf "${TMP_PATH}/arcdyn"
unzip -o "${TMP_PATH}/main.zip" -d "${TMP_PATH}" 2>/dev/null
cp -rf "${TMP_PATH}/arc-main/files/initrd/opt/arc" "${ARC_PATH}"
rm -rf "${TMP_PATH}/arc-main"
echo "true" >"${PART1_PATH}/dynamic"
init.sh
fi
@ -78,10 +79,11 @@ fi
# Mounts backtitle dynamically
function backtitle() {
if [ "${ARCDYN}" == "true" ]; then
ARC_TITLE="${ARC_TITLE}D"
fi
if [ -n "${NEWTAG}" ] && [ "${NEWTAG}" != "${ARC_VERSION}" ]; then
ARC_TITLE="${ARC_TITLE} > ${NEWTAG}"
ARC_TITLE="Dynamic"
else
if [ -n "${NEWTAG}" ] && [ "${NEWTAG}" != "${ARC_VERSION}" ]; then
ARC_TITLE="${ARC_TITLE} > ${NEWTAG}"
fi
fi
if [ -z "${MODEL}" ]; then
MODEL="(Model)"
@ -1157,10 +1159,13 @@ else
writeConfigKey "arc.dynamic" "${ARCDYN}" "${USER_CONFIG_FILE}"
if [ "${ARCDYN}" == "true" ]; then
curl -skL "https://github.com/AuxXxilium/arc/archive/refs/heads/main.zip" -o "${TMP_PATH}/main.zip"
unzip -o "${TMP_PATH}/main.zip" -d "${TMP_PATH}/arcdyn" 2>/dev/null
cp -rf "${TMP_PATH}/arcdyn/files/initrd/opt/arc" "${ARC_PATH}"
rm -rf "${TMP_PATH}/arcdyn"
unzip -o "${TMP_PATH}/main.zip" -d "${TMP_PATH}" 2>/dev/null
cp -rf "${TMP_PATH}/arc-main/files/initrd/opt/arc" "${ARC_PATH}"
rm -rf "${TMP_PATH}/arc-main"
echo "true" >"${PART1_PATH}/dynamic"
init.sh
else
rm -f "${PART1_PATH}/dynamic"
fi
NEXT="Y"
;;

View File

@ -86,6 +86,7 @@ else
fi
[ $(echo "${ARC_VERSION}" | grep -q "s" | wc -l) -gt 0 ] && writeConfigKey "arc.branch" "s" "${USER_CONFIG_FILE}" || writeConfigKey "arc.branch" "" "${USER_CONFIG_FILE}"
[ -f "${PART3_PATH}/automated" ] && rm -f "${PART3_PATH}/automated" >/dev/null
[ -f rm -f "${PART1_PATH}/dynamic" ] && rm -f "${PART1_PATH}/dynamic" >/dev/null
# Check for compatibility
compatboot