mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
修复 availableAddons 函数中的描述输出,确保无非法字符
This commit is contained in:
parent
6b91aea9be
commit
bf9d1ed086
@ -29,7 +29,7 @@ function availableAddons() {
|
|||||||
[ -z "${DESC}" ] && DESC="$(readConfigKey "description.en_US" "${D}/manifest.yml")"
|
[ -z "${DESC}" ] && DESC="$(readConfigKey "description.en_US" "${D}/manifest.yml")"
|
||||||
[ -z "${DESC}" ] && DESC="$(readConfigKey "description" "${D}/manifest.yml")"
|
[ -z "${DESC}" ] && DESC="$(readConfigKey "description" "${D}/manifest.yml")"
|
||||||
|
|
||||||
DESC="$(echo "${DESC}" | sed -E 's/["\n]/ /g' | xargs)"
|
DESC="$(echo "${DESC}" | tr -d '\n\r\t\\' | sed "s/\"/'/g")"
|
||||||
echo "${ADDON} \"${DESC:-"unknown"}\""
|
echo "${ADDON} \"${DESC:-"unknown"}\""
|
||||||
done <<<"$(find "${ADDONS_PATH}" -maxdepth 1 -type d 2>/dev/null | sort)"
|
done <<<"$(find "${ADDONS_PATH}" -maxdepth 1 -type d 2>/dev/null | sort)"
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ function getAllModules() {
|
|||||||
local N DESC
|
local N DESC
|
||||||
N="$(basename "${F}" .ko)"
|
N="$(basename "${F}" .ko)"
|
||||||
DESC="$(modinfo -F description "${F}" 2>/dev/null)"
|
DESC="$(modinfo -F description "${F}" 2>/dev/null)"
|
||||||
DESC="$(echo "${DESC}" | sed -E 's/["\n]/ /g' | xargs)"
|
DESC="$(echo "${DESC}" | tr -d '\n\r\t\\' | sed "s/\"/'/g")"
|
||||||
echo "${N} \"${DESC:-${N}}\""
|
echo "${N} \"${DESC:-${N}}\""
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -645,7 +645,7 @@ function addonMenu() {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
DIALOG --title "$(TEXT "Addons")" \
|
DIALOG --title "$(TEXT "Addons")" \
|
||||||
--menu "$(TEXT "Select an addon")" 0 0 20 --file "${TMP_PATH}/menu" \
|
--menu "$(TEXT "Select an addon")" 0 0 25 --file "${TMP_PATH}/menu" \
|
||||||
2>"${TMP_PATH}/resp"
|
2>"${TMP_PATH}/resp"
|
||||||
[ $? -ne 0 ] && continue
|
[ $? -ne 0 ] && continue
|
||||||
resp="$(cat "${TMP_PATH}/resp" 2>/dev/null)"
|
resp="$(cat "${TMP_PATH}/resp" 2>/dev/null)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user