arc: remove amepatch if arc patch is false

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-07-21 14:20:57 +02:00
parent d513e63c59
commit bd8e23f125

View File

@ -38,6 +38,7 @@ function addonSelection() {
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
# read addons from user config
unset ADDONS
declare -A ADDONS
@ -48,7 +49,7 @@ function addonSelection() {
touch "${TMP_PATH}/opts"
while read -r ADDON DESC; do
arrayExistItem "${ADDON}" "${!ADDONS[@]}" && ACT="on" || ACT="off"
if [ "${ADDON}" == "amepatch" ] && [ "${OFFLINE}" == "true" ]; then
if [ "${ADDON}" == "amepatch" ] && [ "${ARCPATCH}" == "false" ]; then
continue
else
echo -e "${ADDON} \"${DESC}\" ${ACT}" >>"${TMP_PATH}/opts"